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
58e901b6fd1163172149fd422565523b17eed5f0
rust/tests/ui/inner-static-type-parameter.rs

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

12 lines
199 B
Rust
Raw Normal View History

Forbid type parameters in inner statics Closes #9186
2013-10-30 16:44:55 -07:00
// see #9186
Make name resolution errors non-fatal
2015-12-11 20:59:11 +13:00
enum Bar<T> { What } //~ ERROR parameter `T` is never used
Forbid type parameters in inner statics Closes #9186
2013-10-30 16:44:55 -07:00
fn foo<T>() {
Switch to purely namespaced enums This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
2014-11-06 00:05:53 -08:00
static a: Bar<T> = Bar::What;
Make name resolution handle consts in GenericParamsFromOuterFunction properly
2019-02-07 14:59:59 +01:00
//~^ ERROR can't use generic parameters from outer function
Forbid type parameters in inner statics Closes #9186
2013-10-30 16:44:55 -07:00
}
fn main() {
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3383ms 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