diff options
| author | bors <bors@rust-lang.org> | 2022-01-15 14:43:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-01-15 14:43:45 +0000 |
| commit | ec4bcaac450279b029f3480b8b8f1b82ab36a5eb (patch) | |
| tree | 7868ce973b848dee601867b72239114eb6225c22 /src | |
| parent | b13a5bf3c4d66ce375f5978c2c2233f9714b721e (diff) | |
| parent | 441c1a6c50cab4b010d03ceb9a7b616487720b1f (diff) | |
| download | rust-ec4bcaac450279b029f3480b8b8f1b82ab36a5eb.tar.gz rust-ec4bcaac450279b029f3480b8b8f1b82ab36a5eb.zip | |
Auto merge of #92441 - cjgillot:resolve-trait-impl-item, r=matthewjasper
Link impl items to corresponding trait items in late resolver. Hygienically linking trait impl items to declarations in the trait can be done directly by the late resolver. In fact, it is already done to diagnose unknown items. This PR uses this resolution work and stores the `DefId` of the trait item in the HIR. This avoids having to do this resolution manually later. r? `@matthewjasper` Related to #90639. The added `trait_item_id` field can be moved to `ImplItemRef` to be used directly by your PR.
Diffstat (limited to 'src')
11 files changed, 260 insertions, 251 deletions
diff --git a/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr b/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr index 20e61303e36..41fb1456f86 100644 --- a/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr +++ b/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr @@ -1,87 +1,3 @@ -error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/feature-gate-in_band_lifetimes.rs:50:14 - | -LL | impl MyTrait<'a> for Y<&'a u8> { - | - ^^ undeclared lifetime - | | - | help: consider introducing lifetime `'a` here: `<'a>` - | - = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes - -error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/feature-gate-in_band_lifetimes.rs:50:25 - | -LL | impl MyTrait<'a> for Y<&'a u8> { - | - ^^ undeclared lifetime - | | - | help: consider introducing lifetime `'a` here: `<'a>` - | - = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes - -error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/feature-gate-in_band_lifetimes.rs:53:31 - | -LL | fn my_lifetime(&self) -> &'a u8 { self.0 } - | ^^ undeclared lifetime - | - = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes -help: consider introducing lifetime `'a` here - | -LL | impl<'a> MyTrait<'a> for Y<&'a u8> { - | ++++ -help: consider introducing lifetime `'a` here - | -LL | fn my_lifetime<'a>(&self) -> &'a u8 { self.0 } - | ++++ - -error[E0261]: use of undeclared lifetime name `'b` - --> $DIR/feature-gate-in_band_lifetimes.rs:55:27 - | -LL | fn any_lifetime() -> &'b u8 { &0 } - | ^^ undeclared lifetime - | - = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes -help: consider introducing lifetime `'b` here - | -LL | impl<'b> MyTrait<'a> for Y<&'a u8> { - | ++++ -help: consider introducing lifetime `'b` here - | -LL | fn any_lifetime<'b>() -> &'b u8 { &0 } - | ++++ - -error[E0261]: use of undeclared lifetime name `'b` - --> $DIR/feature-gate-in_band_lifetimes.rs:57:27 - | -LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 } - | ^^ undeclared lifetime - | - = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes -help: consider introducing lifetime `'b` here - | -LL | impl<'b> MyTrait<'a> for Y<&'a u8> { - | ++++ -help: consider introducing lifetime `'b` here - | -LL | fn borrowed_lifetime<'b>(&'b self) -> &'b u8 { &*self.0 } - | ++++ - -error[E0261]: use of undeclared lifetime name `'b` - --> $DIR/feature-gate-in_band_lifetimes.rs:57:40 - | -LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 } - | ^^ undeclared lifetime - | - = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes -help: consider introducing lifetime `'b` here - | -LL | impl<'b> MyTrait<'a> for Y<&'a u8> { - | ++++ -help: consider introducing lifetime `'b` here - | -LL | fn borrowed_lifetime<'b>(&'b self) -> &'b u8 { &*self.0 } - | ++++ - error[E0261]: use of undeclared lifetime name `'x` --> $DIR/feature-gate-in_band_lifetimes.rs:3:12 | @@ -178,6 +94,90 @@ help: consider introducing lifetime `'a` here LL | fn inner<'a>(&self) -> &'a u8 { | ++++ +error[E0261]: use of undeclared lifetime name `'a` + --> $DIR/feature-gate-in_band_lifetimes.rs:50:14 + | +LL | impl MyTrait<'a> for Y<&'a u8> { + | - ^^ undeclared lifetime + | | + | help: consider introducing lifetime `'a` here: `<'a>` + | + = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes + +error[E0261]: use of undeclared lifetime name `'a` + --> $DIR/feature-gate-in_band_lifetimes.rs:50:25 + | +LL | impl MyTrait<'a> for Y<&'a u8> { + | - ^^ undeclared lifetime + | | + | help: consider introducing lifetime `'a` here: `<'a>` + | + = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes + +error[E0261]: use of undeclared lifetime name `'a` + --> $DIR/feature-gate-in_band_lifetimes.rs:53:31 + | +LL | fn my_lifetime(&self) -> &'a u8 { self.0 } + | ^^ undeclared lifetime + | + = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes +help: consider introducing lifetime `'a` here + | +LL | impl<'a> MyTrait<'a> for Y<&'a u8> { + | ++++ +help: consider introducing lifetime `'a` here + | +LL | fn my_lifetime<'a>(&self) -> &'a u8 { self.0 } + | ++++ + +error[E0261]: use of undeclared lifetime name `'b` + --> $DIR/feature-gate-in_band_lifetimes.rs:55:27 + | +LL | fn any_lifetime() -> &'b u8 { &0 } + | ^^ undeclared lifetime + | + = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes +help: consider introducing lifetime `'b` here + | +LL | impl<'b> MyTrait<'a> for Y<&'a u8> { + | ++++ +help: consider introducing lifetime `'b` here + | +LL | fn any_lifetime<'b>() -> &'b u8 { &0 } + | ++++ + +error[E0261]: use of undeclared lifetime name `'b` + --> $DIR/feature-gate-in_band_lifetimes.rs:57:27 + | +LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 } + | ^^ undeclared lifetime + | + = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes +help: consider introducing lifetime `'b` here + | +LL | impl<'b> MyTrait<'a> for Y<&'a u8> { + | ++++ +help: consider introducing lifetime `'b` here + | +LL | fn borrowed_lifetime<'b>(&'b self) -> &'b u8 { &*self.0 } + | ++++ + +error[E0261]: use of undeclared lifetime name `'b` + --> $DIR/feature-gate-in_band_lifetimes.rs:57:40 + | +LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 } + | ^^ undeclared lifetime + | + = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes +help: consider introducing lifetime `'b` here + | +LL | impl<'b> MyTrait<'a> for Y<&'a u8> { + | ++++ +help: consider introducing lifetime `'b` here + | +LL | fn borrowed_lifetime<'b>(&'b self) -> &'b u8 { &*self.0 } + | ++++ + error[E0261]: use of undeclared lifetime name `'b` --> $DIR/feature-gate-in_band_lifetimes.rs:43:27 | diff --git a/src/test/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr b/src/test/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr index e0e0acadb37..f647380ef9b 100644 --- a/src/test/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr +++ b/src/test/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr @@ -38,11 +38,27 @@ error[E0658]: the precise format of `Fn`-family traits' type parameters is subje --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:9:6 | LL | impl Fn<()> for Foo { - | ^^^^^^ help: use parenthetical notation instead: `Fn() -> ()` + | ^^^^^^ | = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable +error[E0183]: manual implementations of `Fn` are experimental + --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:9:6 + | +LL | impl Fn<()> for Foo { + | ^^^^^^ manual implementations of `Fn` are experimental + | + = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + +error[E0183]: manual implementations of `FnOnce` are experimental + --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:16:6 + | +LL | impl FnOnce() for Foo1 { + | ^^^^^^^^ manual implementations of `FnOnce` are experimental + | + = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + error[E0229]: associated type bindings are not allowed here --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:16:6 | @@ -53,49 +69,33 @@ error[E0658]: the precise format of `Fn`-family traits' type parameters is subje --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:23:6 | LL | impl FnMut<()> for Bar { - | ^^^^^^^^^ help: use parenthetical notation instead: `FnMut() -> ()` - | - = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information - = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable - -error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change - --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:30:6 - | -LL | impl FnOnce<()> for Baz { - | ^^^^^^^^^^ help: use parenthetical notation instead: `FnOnce() -> ()` + | ^^^^^^^^^ | = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable -error[E0183]: manual implementations of `Fn` are experimental - --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:9:1 - | -LL | impl Fn<()> for Foo { - | ^^^^^^^^^^^^^^^^^^^ manual implementations of `Fn` are experimental - | - = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable - error[E0183]: manual implementations of `FnMut` are experimental - --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:23:1 + --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:23:6 | LL | impl FnMut<()> for Bar { - | ^^^^^^^^^^^^^^^^^^^^^^ manual implementations of `FnMut` are experimental + | ^^^^^^^^^ manual implementations of `FnMut` are experimental | = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable -error[E0183]: manual implementations of `FnOnce` are experimental - --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:16:1 +error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change + --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:30:6 | -LL | impl FnOnce() for Foo1 { - | ^^^^^^^^^^^^^^^^^^^^^^ manual implementations of `FnOnce` are experimental +LL | impl FnOnce<()> for Baz { + | ^^^^^^^^^^ | + = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable error[E0183]: manual implementations of `FnOnce` are experimental - --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:30:1 + --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:30:6 | LL | impl FnOnce<()> for Baz { - | ^^^^^^^^^^^^^^^^^^^^^^^ manual implementations of `FnOnce` are experimental + | ^^^^^^^^^^ manual implementations of `FnOnce` are experimental | = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-unboxed-closures.stderr b/src/test/ui/feature-gates/feature-gate-unboxed-closures.stderr index 8c5f8796456..a763c28de60 100644 --- a/src/test/ui/feature-gates/feature-gate-unboxed-closures.stderr +++ b/src/test/ui/feature-gates/feature-gate-unboxed-closures.stderr @@ -11,16 +11,16 @@ error[E0658]: the precise format of `Fn`-family traits' type parameters is subje --> $DIR/feature-gate-unboxed-closures.rs:5:6 | LL | impl FnOnce<(u32, u32)> for Test { - | ^^^^^^^^^^^^^^^^^^ help: use parenthetical notation instead: `FnOnce(u32, u32) -> ()` + | ^^^^^^^^^^^^^^^^^^ | = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable error[E0183]: manual implementations of `FnOnce` are experimental - --> $DIR/feature-gate-unboxed-closures.rs:5:1 + --> $DIR/feature-gate-unboxed-closures.rs:5:6 | LL | impl FnOnce<(u32, u32)> for Test { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ manual implementations of `FnOnce` are experimental + | ^^^^^^^^^^^^^^^^^^ manual implementations of `FnOnce` are experimental | = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable diff --git a/src/test/ui/issues/issue-3214.rs b/src/test/ui/issues/issue-3214.rs index aa43d06c99b..928a65938b7 100644 --- a/src/test/ui/issues/issue-3214.rs +++ b/src/test/ui/issues/issue-3214.rs @@ -5,8 +5,7 @@ fn foo<T>() { impl<T> Drop for Foo<T> { //~^ ERROR this struct takes 0 generic arguments but 1 generic argument - //~| ERROR the type parameter `T` is not constrained by the impl trait, self type, or predicates fn drop(&mut self) {} } } -fn main() { } +fn main() {} diff --git a/src/test/ui/issues/issue-3214.stderr b/src/test/ui/issues/issue-3214.stderr index 094da64d76d..4d8eb6360e6 100644 --- a/src/test/ui/issues/issue-3214.stderr +++ b/src/test/ui/issues/issue-3214.stderr @@ -23,13 +23,7 @@ note: struct defined here, with 0 generic parameters LL | struct Foo { | ^^^ -error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-3214.rs:6:10 - | -LL | impl<T> Drop for Foo<T> { - | ^ unconstrained type parameter - -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors -Some errors have detailed explanations: E0107, E0207, E0401. +Some errors have detailed explanations: E0107, E0401. For more information about an error, try `rustc --explain E0107`. diff --git a/src/test/ui/span/impl-wrong-item-for-trait.rs b/src/test/ui/span/impl-wrong-item-for-trait.rs index 672fe8dccf7..bf335868643 100644 --- a/src/test/ui/span/impl-wrong-item-for-trait.rs +++ b/src/test/ui/span/impl-wrong-item-for-trait.rs @@ -29,12 +29,10 @@ impl Foo for FooTypeForMethod { //~^ ERROR E0046 type bar = u64; //~^ ERROR E0325 - //~| ERROR E0437 const MY_CONST: u32 = 1; } -impl Debug for FooTypeForMethod { -} -//~^^ ERROR E0046 +impl Debug for FooTypeForMethod {} +//~^ ERROR E0046 -fn main () {} +fn main() {} diff --git a/src/test/ui/span/impl-wrong-item-for-trait.stderr b/src/test/ui/span/impl-wrong-item-for-trait.stderr index d805bbc7926..82ef13f3362 100644 --- a/src/test/ui/span/impl-wrong-item-for-trait.stderr +++ b/src/test/ui/span/impl-wrong-item-for-trait.stderr @@ -1,8 +1,11 @@ -error[E0437]: type `bar` is not a member of trait `Foo` - --> $DIR/impl-wrong-item-for-trait.rs:30:5 +error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo` + --> $DIR/impl-wrong-item-for-trait.rs:12:5 | -LL | type bar = u64; - | ^^^^^^^^^^^^^^^ not a member of trait `Foo` +LL | fn bar(&self); + | -------------- item in trait +... +LL | const bar: u64 = 1; + | ^^^^^^^^^^^^^^^^^^^ does not match trait error[E0324]: item `MY_CONST` is an associated method, which doesn't match its trait `Foo` --> $DIR/impl-wrong-item-for-trait.rs:22:5 @@ -13,15 +16,6 @@ LL | const MY_CONST: u32; LL | fn MY_CONST() {} | ^^^^^^^^^^^^^^^^ does not match trait -error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo` - --> $DIR/impl-wrong-item-for-trait.rs:12:5 - | -LL | fn bar(&self); - | -------------- item in trait -... -LL | const bar: u64 = 1; - | ^^^^^^^^^^^^^^^^^^^ does not match trait - error[E0325]: item `bar` is an associated type, which doesn't match its trait `Foo` --> $DIR/impl-wrong-item-for-trait.rs:30:5 | @@ -59,14 +53,14 @@ LL | impl Foo for FooTypeForMethod { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation error[E0046]: not all trait items implemented, missing: `fmt` - --> $DIR/impl-wrong-item-for-trait.rs:36:1 + --> $DIR/impl-wrong-item-for-trait.rs:35:1 | -LL | impl Debug for FooTypeForMethod { +LL | impl Debug for FooTypeForMethod {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation | = help: implement the missing item: `fn fmt(&self, _: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { todo!() }` -error: aborting due to 8 previous errors +error: aborting due to 7 previous errors -Some errors have detailed explanations: E0046, E0323, E0324, E0325, E0437. +Some errors have detailed explanations: E0046, E0323, E0324, E0325. For more information about an error, try `rustc --explain E0046`. diff --git a/src/test/ui/stability-attribute/generics-default-stability-trait.rs b/src/test/ui/stability-attribute/generics-default-stability-trait.rs new file mode 100644 index 00000000000..d436088e426 --- /dev/null +++ b/src/test/ui/stability-attribute/generics-default-stability-trait.rs @@ -0,0 +1,33 @@ +// aux-build:unstable_generic_param.rs +#![feature(unstable_default6)] + +extern crate unstable_generic_param; + +use unstable_generic_param::*; + +struct R; + +impl Trait1 for S { + fn foo() -> () { () } // ok +} + +struct S; + +impl Trait1<usize> for S { //~ ERROR use of unstable library feature 'unstable_default' + fn foo() -> usize { 0 } +} + +impl Trait1<isize> for S { //~ ERROR use of unstable library feature 'unstable_default' + fn foo() -> isize { 0 } +} + +impl Trait2<usize> for S { //~ ERROR use of unstable library feature 'unstable_default' + fn foo() -> usize { 0 } +} + +impl Trait3<usize> for S { + fn foo() -> usize { 0 } // ok +} + +fn main() { +} diff --git a/src/test/ui/stability-attribute/generics-default-stability-trait.stderr b/src/test/ui/stability-attribute/generics-default-stability-trait.stderr new file mode 100644 index 00000000000..03e61b78e06 --- /dev/null +++ b/src/test/ui/stability-attribute/generics-default-stability-trait.stderr @@ -0,0 +1,27 @@ +error[E0658]: use of unstable library feature 'unstable_default' + --> $DIR/generics-default-stability-trait.rs:16:13 + | +LL | impl Trait1<usize> for S { + | ^^^^^ + | + = help: add `#![feature(unstable_default)]` to the crate attributes to enable + +error[E0658]: use of unstable library feature 'unstable_default' + --> $DIR/generics-default-stability-trait.rs:20:13 + | +LL | impl Trait1<isize> for S { + | ^^^^^ + | + = help: add `#![feature(unstable_default)]` to the crate attributes to enable + +error[E0658]: use of unstable library feature 'unstable_default' + --> $DIR/generics-default-stability-trait.rs:24:13 + | +LL | impl Trait2<usize> for S { + | ^^^^^ + | + = help: add `#![feature(unstable_default)]` to the crate attributes to enable + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/stability-attribute/generics-default-stability.rs b/src/test/ui/stability-attribute/generics-default-stability.rs index 67f2334efc8..c5132861f85 100644 --- a/src/test/ui/stability-attribute/generics-default-stability.rs +++ b/src/test/ui/stability-attribute/generics-default-stability.rs @@ -13,18 +13,6 @@ impl Trait1 for S { struct S; -impl Trait1<usize> for S { //~ ERROR use of unstable library feature 'unstable_default' - fn foo() -> usize { 0 } -} - -impl Trait1<isize> for S { //~ ERROR use of unstable library feature 'unstable_default' - fn foo() -> isize { 0 } -} - -impl Trait2<usize> for S { //~ ERROR use of unstable library feature 'unstable_default' - fn foo() -> usize { 0 } -} - impl Trait3<usize> for S { fn foo() -> usize { 0 } // ok } diff --git a/src/test/ui/stability-attribute/generics-default-stability.stderr b/src/test/ui/stability-attribute/generics-default-stability.stderr index bc59844f77c..2a9d34a15c4 100644 --- a/src/test/ui/stability-attribute/generics-default-stability.stderr +++ b/src/test/ui/stability-attribute/generics-default-stability.stderr @@ -1,29 +1,5 @@ -error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:16:13 - | -LL | impl Trait1<usize> for S { - | ^^^^^ - | - = help: add `#![feature(unstable_default)]` to the crate attributes to enable - -error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:20:13 - | -LL | impl Trait1<isize> for S { - | ^^^^^ - | - = help: add `#![feature(unstable_default)]` to the crate attributes to enable - -error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:24:13 - | -LL | impl Trait2<usize> for S { - | ^^^^^ - | - = help: add `#![feature(unstable_default)]` to the crate attributes to enable - warning: use of deprecated struct `unstable_generic_param::Struct4`: test - --> $DIR/generics-default-stability.rs:83:29 + --> $DIR/generics-default-stability.rs:71:29 | LL | let _: Struct4<isize> = Struct4 { field: 1 }; | ^^^^^^^ @@ -31,217 +7,217 @@ LL | let _: Struct4<isize> = Struct4 { field: 1 }; = note: `#[warn(deprecated)]` on by default warning: use of deprecated struct `unstable_generic_param::Struct4`: test - --> $DIR/generics-default-stability.rs:83:12 + --> $DIR/generics-default-stability.rs:71:12 | LL | let _: Struct4<isize> = Struct4 { field: 1 }; | ^^^^^^^ warning: use of deprecated struct `unstable_generic_param::Struct4`: test - --> $DIR/generics-default-stability.rs:88:12 + --> $DIR/generics-default-stability.rs:76:12 | LL | let _: Struct4 = STRUCT4; | ^^^^^^^ warning: use of deprecated struct `unstable_generic_param::Struct4`: test - --> $DIR/generics-default-stability.rs:89:12 + --> $DIR/generics-default-stability.rs:77:12 | LL | let _: Struct4<usize> = STRUCT4; | ^^^^^^^ warning: use of deprecated struct `unstable_generic_param::Struct4`: test - --> $DIR/generics-default-stability.rs:90:29 + --> $DIR/generics-default-stability.rs:78:29 | LL | let _: Struct4<isize> = Struct4 { field: 0 }; | ^^^^^^^ warning: use of deprecated struct `unstable_generic_param::Struct4`: test - --> $DIR/generics-default-stability.rs:90:12 + --> $DIR/generics-default-stability.rs:78:12 | LL | let _: Struct4<isize> = Struct4 { field: 0 }; | ^^^^^^^ warning: use of deprecated struct `unstable_generic_param::Struct5`: test - --> $DIR/generics-default-stability.rs:96:29 + --> $DIR/generics-default-stability.rs:84:29 | LL | let _: Struct5<isize> = Struct5 { field: 1 }; | ^^^^^^^ warning: use of deprecated struct `unstable_generic_param::Struct5`: test - --> $DIR/generics-default-stability.rs:96:12 + --> $DIR/generics-default-stability.rs:84:12 | LL | let _: Struct5<isize> = Struct5 { field: 1 }; | ^^^^^^^ warning: use of deprecated struct `unstable_generic_param::Struct5`: test - --> $DIR/generics-default-stability.rs:101:12 + --> $DIR/generics-default-stability.rs:89:12 | LL | let _: Struct5 = STRUCT5; | ^^^^^^^ warning: use of deprecated struct `unstable_generic_param::Struct5`: test - --> $DIR/generics-default-stability.rs:102:12 + --> $DIR/generics-default-stability.rs:90:12 | LL | let _: Struct5<usize> = STRUCT5; | ^^^^^^^ warning: use of deprecated struct `unstable_generic_param::Struct5`: test - --> $DIR/generics-default-stability.rs:104:29 + --> $DIR/generics-default-stability.rs:92:29 | LL | let _: Struct5<isize> = Struct5 { field: 0 }; | ^^^^^^^ warning: use of deprecated struct `unstable_generic_param::Struct5`: test - --> $DIR/generics-default-stability.rs:104:12 + --> $DIR/generics-default-stability.rs:92:12 | LL | let _: Struct5<isize> = Struct5 { field: 0 }; | ^^^^^^^ warning: use of deprecated type alias `unstable_generic_param::Alias4`: test - --> $DIR/generics-default-stability.rs:159:28 + --> $DIR/generics-default-stability.rs:147:28 | LL | let _: Alias4<isize> = Alias4::Some(1); | ^^^^^^ warning: use of deprecated type alias `unstable_generic_param::Alias4`: test - --> $DIR/generics-default-stability.rs:159:12 + --> $DIR/generics-default-stability.rs:147:12 | LL | let _: Alias4<isize> = Alias4::Some(1); | ^^^^^^ warning: use of deprecated type alias `unstable_generic_param::Alias4`: test - --> $DIR/generics-default-stability.rs:163:12 + --> $DIR/generics-default-stability.rs:151:12 | LL | let _: Alias4 = ALIAS4; | ^^^^^^ warning: use of deprecated type alias `unstable_generic_param::Alias4`: test - --> $DIR/generics-default-stability.rs:164:12 + --> $DIR/generics-default-stability.rs:152:12 | LL | let _: Alias4<usize> = ALIAS4; | ^^^^^^ warning: use of deprecated type alias `unstable_generic_param::Alias4`: test - --> $DIR/generics-default-stability.rs:165:28 + --> $DIR/generics-default-stability.rs:153:28 | LL | let _: Alias4<isize> = Alias4::Some(0); | ^^^^^^ warning: use of deprecated type alias `unstable_generic_param::Alias4`: test - --> $DIR/generics-default-stability.rs:165:12 + --> $DIR/generics-default-stability.rs:153:12 | LL | let _: Alias4<isize> = Alias4::Some(0); | ^^^^^^ warning: use of deprecated type alias `unstable_generic_param::Alias5`: test - --> $DIR/generics-default-stability.rs:170:28 + --> $DIR/generics-default-stability.rs:158:28 | LL | let _: Alias5<isize> = Alias5::Some(1); | ^^^^^^ warning: use of deprecated type alias `unstable_generic_param::Alias5`: test - --> $DIR/generics-default-stability.rs:170:12 + --> $DIR/generics-default-stability.rs:158:12 | LL | let _: Alias5<isize> = Alias5::Some(1); | ^^^^^^ warning: use of deprecated type alias `unstable_generic_param::Alias5`: test - --> $DIR/generics-default-stability.rs:174:12 + --> $DIR/generics-default-stability.rs:162:12 | LL | let _: Alias5 = ALIAS5; | ^^^^^^ warning: use of deprecated type alias `unstable_generic_param::Alias5`: test - --> $DIR/generics-default-stability.rs:175:12 + --> $DIR/generics-default-stability.rs:163:12 | LL | let _: Alias5<usize> = ALIAS5; | ^^^^^^ warning: use of deprecated type alias `unstable_generic_param::Alias5`: test - --> $DIR/generics-default-stability.rs:177:28 + --> $DIR/generics-default-stability.rs:165:28 | LL | let _: Alias5<isize> = Alias5::Some(0); | ^^^^^^ warning: use of deprecated type alias `unstable_generic_param::Alias5`: test - --> $DIR/generics-default-stability.rs:177:12 + --> $DIR/generics-default-stability.rs:165:12 | LL | let _: Alias5<isize> = Alias5::Some(0); | ^^^^^^ warning: use of deprecated variant `unstable_generic_param::Enum4::Some`: test - --> $DIR/generics-default-stability.rs:231:34 + --> $DIR/generics-default-stability.rs:219:34 | LL | let _: Enum4<isize> = Enum4::Some(1); | ^^^^ warning: use of deprecated enum `unstable_generic_param::Enum4`: test - --> $DIR/generics-default-stability.rs:231:12 + --> $DIR/generics-default-stability.rs:219:12 | LL | let _: Enum4<isize> = Enum4::Some(1); | ^^^^^ warning: use of deprecated enum `unstable_generic_param::Enum4`: test - --> $DIR/generics-default-stability.rs:235:12 + --> $DIR/generics-default-stability.rs:223:12 | LL | let _: Enum4 = ENUM4; | ^^^^^ warning: use of deprecated enum `unstable_generic_param::Enum4`: test - --> $DIR/generics-default-stability.rs:236:12 + --> $DIR/generics-default-stability.rs:224:12 | LL | let _: Enum4<usize> = ENUM4; | ^^^^^ warning: use of deprecated variant `unstable_generic_param::Enum4::Some`: test - --> $DIR/generics-default-stability.rs:237:34 + --> $DIR/generics-default-stability.rs:225:34 | LL | let _: Enum4<isize> = Enum4::Some(0); | ^^^^ warning: use of deprecated enum `unstable_generic_param::Enum4`: test - --> $DIR/generics-default-stability.rs:237:12 + --> $DIR/generics-default-stability.rs:225:12 | LL | let _: Enum4<isize> = Enum4::Some(0); | ^^^^^ warning: use of deprecated variant `unstable_generic_param::Enum5::Some`: test - --> $DIR/generics-default-stability.rs:242:34 + --> $DIR/generics-default-stability.rs:230:34 | LL | let _: Enum5<isize> = Enum5::Some(1); | ^^^^ warning: use of deprecated enum `unstable_generic_param::Enum5`: test - --> $DIR/generics-default-stability.rs:242:12 + --> $DIR/generics-default-stability.rs:230:12 | LL | let _: Enum5<isize> = Enum5::Some(1); | ^^^^^ warning: use of deprecated enum `unstable_generic_param::Enum5`: test - --> $DIR/generics-default-stability.rs:246:12 + --> $DIR/generics-default-stability.rs:234:12 | LL | let _: Enum5 = ENUM5; | ^^^^^ warning: use of deprecated enum `unstable_generic_param::Enum5`: test - --> $DIR/generics-default-stability.rs:247:12 + --> $DIR/generics-default-stability.rs:235:12 | LL | let _: Enum5<usize> = ENUM5; | ^^^^^ warning: use of deprecated variant `unstable_generic_param::Enum5::Some`: test - --> $DIR/generics-default-stability.rs:249:34 + --> $DIR/generics-default-stability.rs:237:34 | LL | let _: Enum5<isize> = Enum5::Some(0); | ^^^^ warning: use of deprecated enum `unstable_generic_param::Enum5`: test - --> $DIR/generics-default-stability.rs:249:12 + --> $DIR/generics-default-stability.rs:237:12 | LL | let _: Enum5<isize> = Enum5::Some(0); | ^^^^^ error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:35:20 + --> $DIR/generics-default-stability.rs:23:20 | LL | let _: Struct1<isize> = Struct1 { field: 1 }; | ^^^^^ @@ -249,7 +225,7 @@ LL | let _: Struct1<isize> = Struct1 { field: 1 }; = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:39:20 + --> $DIR/generics-default-stability.rs:27:20 | LL | let _: Struct1<usize> = STRUCT1; | ^^^^^ @@ -257,7 +233,7 @@ LL | let _: Struct1<usize> = STRUCT1; = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:40:20 + --> $DIR/generics-default-stability.rs:28:20 | LL | let _: Struct1<isize> = Struct1 { field: 0 }; | ^^^^^ @@ -265,7 +241,7 @@ LL | let _: Struct1<isize> = Struct1 { field: 0 }; = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:69:27 + --> $DIR/generics-default-stability.rs:57:27 | LL | let _: Struct3<isize, usize> = STRUCT3; | ^^^^^ @@ -273,7 +249,7 @@ LL | let _: Struct3<isize, usize> = STRUCT3; = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:71:27 + --> $DIR/generics-default-stability.rs:59:27 | LL | let _: Struct3<isize, isize> = Struct3 { field1: 0, field2: 0 }; | ^^^^^ @@ -281,7 +257,7 @@ LL | let _: Struct3<isize, isize> = Struct3 { field1: 0, field2: 0 }; = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:72:27 + --> $DIR/generics-default-stability.rs:60:27 | LL | let _: Struct3<usize, usize> = Struct3 { field1: 0, field2: 0 }; | ^^^^^ @@ -289,7 +265,7 @@ LL | let _: Struct3<usize, usize> = Struct3 { field1: 0, field2: 0 }; = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:96:20 + --> $DIR/generics-default-stability.rs:84:20 | LL | let _: Struct5<isize> = Struct5 { field: 1 }; | ^^^^^ @@ -297,7 +273,7 @@ LL | let _: Struct5<isize> = Struct5 { field: 1 }; = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:102:20 + --> $DIR/generics-default-stability.rs:90:20 | LL | let _: Struct5<usize> = STRUCT5; | ^^^^^ @@ -305,7 +281,7 @@ LL | let _: Struct5<usize> = STRUCT5; = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:104:20 + --> $DIR/generics-default-stability.rs:92:20 | LL | let _: Struct5<isize> = Struct5 { field: 0 }; | ^^^^^ @@ -313,7 +289,7 @@ LL | let _: Struct5<isize> = Struct5 { field: 0 }; = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:112:19 + --> $DIR/generics-default-stability.rs:100:19 | LL | let _: Alias1<isize> = Alias1::Some(1); | ^^^^^ @@ -321,7 +297,7 @@ LL | let _: Alias1<isize> = Alias1::Some(1); = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:116:19 + --> $DIR/generics-default-stability.rs:104:19 | LL | let _: Alias1<usize> = ALIAS1; | ^^^^^ @@ -329,7 +305,7 @@ LL | let _: Alias1<usize> = ALIAS1; = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:117:19 + --> $DIR/generics-default-stability.rs:105:19 | LL | let _: Alias1<isize> = Alias1::Some(0); | ^^^^^ @@ -337,7 +313,7 @@ LL | let _: Alias1<isize> = Alias1::Some(0); = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:145:26 + --> $DIR/generics-default-stability.rs:133:26 | LL | let _: Alias3<isize, usize> = ALIAS3; | ^^^^^ @@ -345,7 +321,7 @@ LL | let _: Alias3<isize, usize> = ALIAS3; = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:147:26 + --> $DIR/generics-default-stability.rs:135:26 | LL | let _: Alias3<isize, isize> = Alias3::Ok(0); | ^^^^^ @@ -353,7 +329,7 @@ LL | let _: Alias3<isize, isize> = Alias3::Ok(0); = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:148:26 + --> $DIR/generics-default-stability.rs:136:26 | LL | let _: Alias3<usize, usize> = Alias3::Ok(0); | ^^^^^ @@ -361,7 +337,7 @@ LL | let _: Alias3<usize, usize> = Alias3::Ok(0); = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:170:19 + --> $DIR/generics-default-stability.rs:158:19 | LL | let _: Alias5<isize> = Alias5::Some(1); | ^^^^^ @@ -369,7 +345,7 @@ LL | let _: Alias5<isize> = Alias5::Some(1); = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:175:19 + --> $DIR/generics-default-stability.rs:163:19 | LL | let _: Alias5<usize> = ALIAS5; | ^^^^^ @@ -377,7 +353,7 @@ LL | let _: Alias5<usize> = ALIAS5; = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:177:19 + --> $DIR/generics-default-stability.rs:165:19 | LL | let _: Alias5<isize> = Alias5::Some(0); | ^^^^^ @@ -385,7 +361,7 @@ LL | let _: Alias5<isize> = Alias5::Some(0); = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:184:18 + --> $DIR/generics-default-stability.rs:172:18 | LL | let _: Enum1<isize> = Enum1::Some(1); | ^^^^^ @@ -393,7 +369,7 @@ LL | let _: Enum1<isize> = Enum1::Some(1); = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:188:18 + --> $DIR/generics-default-stability.rs:176:18 | LL | let _: Enum1<usize> = ENUM1; | ^^^^^ @@ -401,7 +377,7 @@ LL | let _: Enum1<usize> = ENUM1; = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:189:18 + --> $DIR/generics-default-stability.rs:177:18 | LL | let _: Enum1<isize> = Enum1::Some(0); | ^^^^^ @@ -409,7 +385,7 @@ LL | let _: Enum1<isize> = Enum1::Some(0); = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:217:25 + --> $DIR/generics-default-stability.rs:205:25 | LL | let _: Enum3<isize, usize> = ENUM3; | ^^^^^ @@ -417,7 +393,7 @@ LL | let _: Enum3<isize, usize> = ENUM3; = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:219:25 + --> $DIR/generics-default-stability.rs:207:25 | LL | let _: Enum3<isize, isize> = Enum3::Ok(0); | ^^^^^ @@ -425,7 +401,7 @@ LL | let _: Enum3<isize, isize> = Enum3::Ok(0); = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:220:25 + --> $DIR/generics-default-stability.rs:208:25 | LL | let _: Enum3<usize, usize> = Enum3::Ok(0); | ^^^^^ @@ -433,7 +409,7 @@ LL | let _: Enum3<usize, usize> = Enum3::Ok(0); = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:242:18 + --> $DIR/generics-default-stability.rs:230:18 | LL | let _: Enum5<isize> = Enum5::Some(1); | ^^^^^ @@ -441,7 +417,7 @@ LL | let _: Enum5<isize> = Enum5::Some(1); = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:247:18 + --> $DIR/generics-default-stability.rs:235:18 | LL | let _: Enum5<usize> = ENUM5; | ^^^^^ @@ -449,7 +425,7 @@ LL | let _: Enum5<usize> = ENUM5; = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'unstable_default' - --> $DIR/generics-default-stability.rs:249:18 + --> $DIR/generics-default-stability.rs:237:18 | LL | let _: Enum5<isize> = Enum5::Some(0); | ^^^^^ @@ -457,7 +433,7 @@ LL | let _: Enum5<isize> = Enum5::Some(0); = help: add `#![feature(unstable_default)]` to the crate attributes to enable error[E0658]: use of unstable library feature 'box_alloc_param' - --> $DIR/generics-default-stability.rs:256:24 + --> $DIR/generics-default-stability.rs:244:24 | LL | let _: Box1<isize, System> = Box1::new(1); | ^^^^^^ @@ -465,29 +441,29 @@ LL | let _: Box1<isize, System> = Box1::new(1); = help: add `#![feature(box_alloc_param)]` to the crate attributes to enable warning: use of deprecated field `unstable_generic_param::Struct4::field`: test - --> $DIR/generics-default-stability.rs:83:39 + --> $DIR/generics-default-stability.rs:71:39 | LL | let _: Struct4<isize> = Struct4 { field: 1 }; | ^^^^^^^^ warning: use of deprecated field `unstable_generic_param::Struct4::field`: test - --> $DIR/generics-default-stability.rs:90:39 + --> $DIR/generics-default-stability.rs:78:39 | LL | let _: Struct4<isize> = Struct4 { field: 0 }; | ^^^^^^^^ warning: use of deprecated field `unstable_generic_param::Struct5::field`: test - --> $DIR/generics-default-stability.rs:96:39 + --> $DIR/generics-default-stability.rs:84:39 | LL | let _: Struct5<isize> = Struct5 { field: 1 }; | ^^^^^^^^ warning: use of deprecated field `unstable_generic_param::Struct5::field`: test - --> $DIR/generics-default-stability.rs:104:39 + --> $DIR/generics-default-stability.rs:92:39 | LL | let _: Struct5<isize> = Struct5 { field: 0 }; | ^^^^^^^^ -error: aborting due to 31 previous errors; 40 warnings emitted +error: aborting due to 28 previous errors; 40 warnings emitted For more information about this error, try `rustc --explain E0658`. |
