Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
2fcea9fb68c8e04f10e5cb15bbfb486de9800afa
rust/tests/ui/error-codes/E0771.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
239 B
Rust
Raw Normal View History

Split part of `adt_const_params` into `unsized_const_params`
2024-07-14 13:38:51 +01:00
#![feature(adt_const_params, unsized_const_params)]
//~^ WARN the feature `unsized_const_params` is incomplete
disallow non-static lifetimes in const generics This has been put in place to patch over an ICE caused when we encounter a non-static lifetime in a const generic during borrow checking. This restriction may be relaxed in the future, but we need more discussion before then, and in the meantime we should still deal with this ICE. Fixes issue #60814
2020-07-04 23:43:48 -04:00
improve diagnostics and bless tests
2023-05-05 21:42:51 +01:00
fn function_with_str<'a, const STRING: &'a str>() {} //~ ERROR E0770
disallow non-static lifetimes in const generics This has been put in place to patch over an ICE caused when we encounter a non-static lifetime in a const generic during borrow checking. This restriction may be relaxed in the future, but we need more discussion before then, and in the meantime we should still deal with this ICE. Fixes issue #60814
2020-07-04 23:43:48 -04:00
fn main() {
function_with_str::<"Hello, world!">()
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 2195ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API