diff options
| author | bors <bors@rust-lang.org> | 2018-11-13 12:22:30 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-11-13 12:22:30 +0000 |
| commit | 5c9f7dcd8307f92931bc7e5534b467063b4ecc76 (patch) | |
| tree | d633d2c23f6b5c294e318c5e603e6a526bd3f43e /src/test | |
| parent | 485397e49a02a3b7ff77c17e4a3f16c653925cb3 (diff) | |
| parent | 8d0b9697b5739c1e6bb6e9eea513218e5a60cb1a (diff) | |
| download | rust-5c9f7dcd8307f92931bc7e5534b467063b4ecc76.tar.gz rust-5c9f7dcd8307f92931bc7e5534b467063b4ecc76.zip | |
Auto merge of #55649 - scalexm:chalk-bound-ty, r=nikomatsakis
Use bound types in `librustc_traits` r? @nikomatsakis see the tests which now move the higher-ranked binders to the left in implied bound rules!
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/chalkify/lower_env1.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/chalkify/lower_env1.stderr | 13 | ||||
| -rw-r--r-- | src/test/ui/chalkify/lower_env2.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/chalkify/lower_env2.stderr | 16 | ||||
| -rw-r--r-- | src/test/ui/chalkify/lower_env3.stderr | 10 | ||||
| -rw-r--r-- | src/test/ui/chalkify/lower_impl.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/chalkify/lower_struct.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/chalkify/lower_struct.stderr | 7 | ||||
| -rw-r--r-- | src/test/ui/chalkify/lower_trait.stderr | 14 | ||||
| -rw-r--r-- | src/test/ui/chalkify/lower_trait_higher_rank.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/chalkify/lower_trait_higher_rank.stderr | 9 | ||||
| -rw-r--r-- | src/test/ui/chalkify/lower_trait_where_clause.rs | 14 | ||||
| -rw-r--r-- | src/test/ui/chalkify/lower_trait_where_clause.stderr | 17 | ||||
| -rw-r--r-- | src/test/ui/nll/user-annotations/dump-fn-method.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/nll/user-annotations/dump-fn-method.stderr | 8 |
15 files changed, 59 insertions, 70 deletions
diff --git a/src/test/ui/chalkify/lower_env1.rs b/src/test/ui/chalkify/lower_env1.rs index fc20ad0e08b..b772db5ca55 100644 --- a/src/test/ui/chalkify/lower_env1.rs +++ b/src/test/ui/chalkify/lower_env1.rs @@ -17,7 +17,7 @@ trait Foo { } trait Bar where Self: Foo { } #[rustc_dump_env_program_clauses] //~ ERROR program clause dump -fn bar<T: Bar>() { +fn bar<T: Bar + ?Sized>() { } fn main() { diff --git a/src/test/ui/chalkify/lower_env1.stderr b/src/test/ui/chalkify/lower_env1.stderr index 3aa04cfeb67..4aa40bae319 100644 --- a/src/test/ui/chalkify/lower_env1.stderr +++ b/src/test/ui/chalkify/lower_env1.stderr @@ -4,9 +4,9 @@ error: program clause dump LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: FromEnv(Self: Foo) :- FromEnv(Self: Bar). - = note: Implemented(Self: Bar) :- FromEnv(Self: Bar). - = note: WellFormed(Self: Bar) :- Implemented(Self: Bar), WellFormed(Self: Foo). + = note: forall<Self> { FromEnv(Self: Foo) :- FromEnv(Self: Bar). } + = note: forall<Self> { Implemented(Self: Bar) :- FromEnv(Self: Bar). } + = note: forall<Self> { WellFormed(Self: Bar) :- Implemented(Self: Bar), WellFormed(Self: Foo). } error: program clause dump --> $DIR/lower_env1.rs:19:1 @@ -14,10 +14,9 @@ error: program clause dump LL | #[rustc_dump_env_program_clauses] //~ ERROR program clause dump | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: FromEnv(Self: Foo) :- FromEnv(Self: Bar). - = note: Implemented(Self: Bar) :- FromEnv(Self: Bar). - = note: Implemented(Self: Foo) :- FromEnv(Self: Foo). - = note: Implemented(Self: std::marker::Sized) :- FromEnv(Self: std::marker::Sized). + = note: forall<Self> { FromEnv(Self: Foo) :- FromEnv(Self: Bar). } + = note: forall<Self> { Implemented(Self: Bar) :- FromEnv(Self: Bar). } + = note: forall<Self> { Implemented(Self: Foo) :- FromEnv(Self: Foo). } error: aborting due to 2 previous errors diff --git a/src/test/ui/chalkify/lower_env2.rs b/src/test/ui/chalkify/lower_env2.rs index 0b50dbfdf95..2328db5b4f6 100644 --- a/src/test/ui/chalkify/lower_env2.rs +++ b/src/test/ui/chalkify/lower_env2.rs @@ -14,12 +14,12 @@ trait Foo { } #[rustc_dump_program_clauses] //~ ERROR program clause dump -struct S<'a, T> where T: Foo { +struct S<'a, T: ?Sized> where T: Foo { data: &'a T, } #[rustc_dump_env_program_clauses] //~ ERROR program clause dump -fn bar<'a, T: Foo>(x: S<T>) { +fn bar<T: Foo>(_x: S<'_, T>) { // note that we have an implicit `T: Sized` bound } fn main() { diff --git a/src/test/ui/chalkify/lower_env2.stderr b/src/test/ui/chalkify/lower_env2.stderr index 3b88ac1f22b..74833ef064f 100644 --- a/src/test/ui/chalkify/lower_env2.stderr +++ b/src/test/ui/chalkify/lower_env2.stderr @@ -4,10 +4,9 @@ error: program clause dump LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: FromEnv(T: Foo) :- FromEnv(S<'a, T>). - = note: FromEnv(T: std::marker::Sized) :- FromEnv(S<'a, T>). - = note: TypeOutlives(T : 'a) :- FromEnv(S<'a, T>). - = note: WellFormed(S<'a, T>) :- Implemented(T: std::marker::Sized), Implemented(T: Foo), TypeOutlives(T : 'a). + = note: forall<'a, T> { FromEnv(T: Foo) :- FromEnv(S<'a, T>). } + = note: forall<'a, T> { TypeOutlives(T: 'a) :- FromEnv(S<'a, T>). } + = note: forall<'a, T> { WellFormed(S<'a, T>) :- Implemented(T: Foo), TypeOutlives(T: 'a). } error: program clause dump --> $DIR/lower_env2.rs:21:1 @@ -15,11 +14,10 @@ error: program clause dump LL | #[rustc_dump_env_program_clauses] //~ ERROR program clause dump | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: FromEnv(T: Foo) :- FromEnv(S<'a, T>). - = note: FromEnv(T: std::marker::Sized) :- FromEnv(S<'a, T>). - = note: Implemented(Self: Foo) :- FromEnv(Self: Foo). - = note: Implemented(Self: std::marker::Sized) :- FromEnv(Self: std::marker::Sized). - = note: TypeOutlives(T : 'a) :- FromEnv(S<'a, T>). + = note: forall<'a, T> { FromEnv(T: Foo) :- FromEnv(S<'a, T>). } + = note: forall<'a, T> { TypeOutlives(T: 'a) :- FromEnv(S<'a, T>). } + = note: forall<Self> { Implemented(Self: Foo) :- FromEnv(Self: Foo). } + = note: forall<Self> { Implemented(Self: std::marker::Sized) :- FromEnv(Self: std::marker::Sized). } error: aborting due to 2 previous errors diff --git a/src/test/ui/chalkify/lower_env3.stderr b/src/test/ui/chalkify/lower_env3.stderr index ac0f8e34cd4..eef6405f8f8 100644 --- a/src/test/ui/chalkify/lower_env3.stderr +++ b/src/test/ui/chalkify/lower_env3.stderr @@ -4,7 +4,8 @@ error: program clause dump LL | #[rustc_dump_env_program_clauses] //~ ERROR program clause dump | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: Implemented(Self: Foo) :- FromEnv(Self: Foo). + = note: forall<'^0, ^1> { TypeOutlives(^1: '^0) :- FromEnv(&^1). } + = note: forall<Self> { Implemented(Self: Foo) :- FromEnv(Self: Foo). } error: program clause dump --> $DIR/lower_env3.rs:20:5 @@ -12,9 +13,10 @@ error: program clause dump LL | #[rustc_dump_env_program_clauses] //~ ERROR program clause dump | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: FromEnv(Self: std::marker::Sized) :- FromEnv(Self: std::clone::Clone). - = note: Implemented(Self: std::clone::Clone) :- FromEnv(Self: std::clone::Clone). - = note: Implemented(Self: std::marker::Sized) :- FromEnv(Self: std::marker::Sized). + = note: forall<'^0, ^1> { TypeOutlives(^1: '^0) :- FromEnv(&^1). } + = note: forall<Self> { FromEnv(Self: std::marker::Sized) :- FromEnv(Self: std::clone::Clone). } + = note: forall<Self> { Implemented(Self: std::clone::Clone) :- FromEnv(Self: std::clone::Clone). } + = note: forall<Self> { Implemented(Self: std::marker::Sized) :- FromEnv(Self: std::marker::Sized). } error: aborting due to 2 previous errors diff --git a/src/test/ui/chalkify/lower_impl.stderr b/src/test/ui/chalkify/lower_impl.stderr index c497d76f8d4..92a209f673d 100644 --- a/src/test/ui/chalkify/lower_impl.stderr +++ b/src/test/ui/chalkify/lower_impl.stderr @@ -4,7 +4,7 @@ error: program clause dump LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: Implemented(T: Foo) :- ProjectionEq(<T as std::iter::Iterator>::Item == i32), TypeOutlives(T : 'static), Implemented(T: std::iter::Iterator), Implemented(T: std::marker::Sized). + = note: forall<T> { Implemented(T: Foo) :- ProjectionEq(<T as std::iter::Iterator>::Item == i32), TypeOutlives(T: 'static), Implemented(T: std::iter::Iterator), Implemented(T: std::marker::Sized). } error: program clause dump --> $DIR/lower_impl.rs:23:5 @@ -12,7 +12,7 @@ error: program clause dump LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: Normalize(<T as Bar>::Assoc == std::vec::Vec<T>) :- Implemented(T: Bar). + = note: forall<T> { Normalize(<T as Bar>::Assoc -> std::vec::Vec<T>) :- Implemented(T: Bar). } error: aborting due to 2 previous errors diff --git a/src/test/ui/chalkify/lower_struct.rs b/src/test/ui/chalkify/lower_struct.rs index 9287555a056..9b4bba67112 100644 --- a/src/test/ui/chalkify/lower_struct.rs +++ b/src/test/ui/chalkify/lower_struct.rs @@ -11,8 +11,8 @@ #![feature(rustc_attrs)] #[rustc_dump_program_clauses] //~ ERROR program clause dump -struct Foo<T> where Box<T>: Clone { - _x: std::marker::PhantomData<T>, +struct Foo<'a, T> where Box<T>: Clone { + _x: std::marker::PhantomData<&'a T>, } fn main() { } diff --git a/src/test/ui/chalkify/lower_struct.stderr b/src/test/ui/chalkify/lower_struct.stderr index d6cc9c8e9a4..a0dd9369700 100644 --- a/src/test/ui/chalkify/lower_struct.stderr +++ b/src/test/ui/chalkify/lower_struct.stderr @@ -4,9 +4,10 @@ error: program clause dump LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: FromEnv(T: std::marker::Sized) :- FromEnv(Foo<T>). - = note: FromEnv(std::boxed::Box<T>: std::clone::Clone) :- FromEnv(Foo<T>). - = note: WellFormed(Foo<T>) :- Implemented(T: std::marker::Sized), Implemented(std::boxed::Box<T>: std::clone::Clone). + = note: forall<'a, T> { FromEnv(T: std::marker::Sized) :- FromEnv(Foo<'a, T>). } + = note: forall<'a, T> { FromEnv(std::boxed::Box<T>: std::clone::Clone) :- FromEnv(Foo<'a, T>). } + = note: forall<'a, T> { TypeOutlives(T: 'a) :- FromEnv(Foo<'a, T>). } + = note: forall<'a, T> { WellFormed(Foo<'a, T>) :- Implemented(T: std::marker::Sized), Implemented(std::boxed::Box<T>: std::clone::Clone), TypeOutlives(T: 'a). } error: aborting due to previous error diff --git a/src/test/ui/chalkify/lower_trait.stderr b/src/test/ui/chalkify/lower_trait.stderr index dc2375277e7..6a3f7aa6376 100644 --- a/src/test/ui/chalkify/lower_trait.stderr +++ b/src/test/ui/chalkify/lower_trait.stderr @@ -4,10 +4,10 @@ error: program clause dump LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: FromEnv(<Self as Foo<S, T>>::Assoc: Bar) :- FromEnv(Self: Foo<S, T>). - = note: FromEnv(S: std::marker::Sized) :- FromEnv(Self: Foo<S, T>). - = note: Implemented(Self: Foo<S, T>) :- FromEnv(Self: Foo<S, T>). - = note: WellFormed(Self: Foo<S, T>) :- Implemented(Self: Foo<S, T>), WellFormed(S: std::marker::Sized), WellFormed(<Self as Foo<S, T>>::Assoc: Bar). + = note: forall<Self, S, T> { FromEnv(<Self as Foo<S, T>>::Assoc: Bar) :- FromEnv(Self: Foo<S, T>). } + = note: forall<Self, S, T> { FromEnv(S: std::marker::Sized) :- FromEnv(Self: Foo<S, T>). } + = note: forall<Self, S, T> { Implemented(Self: Foo<S, T>) :- FromEnv(Self: Foo<S, T>). } + = note: forall<Self, S, T> { WellFormed(Self: Foo<S, T>) :- Implemented(Self: Foo<S, T>), WellFormed(S: std::marker::Sized), WellFormed(<Self as Foo<S, T>>::Assoc: Bar). } error: program clause dump --> $DIR/lower_trait.rs:17:5 @@ -15,9 +15,9 @@ error: program clause dump LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: FromEnv(Self: Foo<S, T>) :- FromEnv(Unnormalized(<Self as Foo<S, T>>::Assoc)). - = note: ProjectionEq(<Self as Foo<S, T>>::Assoc == Unnormalized(<Self as Foo<S, T>>::Assoc)). - = note: WellFormed(Unnormalized(<Self as Foo<S, T>>::Assoc)) :- Implemented(Self: Foo<S, T>). + = note: forall<Self, S, T> { FromEnv(Self: Foo<S, T>) :- FromEnv(Unnormalized(<Self as Foo<S, T>>::Assoc)). } + = note: forall<Self, S, T> { ProjectionEq(<Self as Foo<S, T>>::Assoc == Unnormalized(<Self as Foo<S, T>>::Assoc)). } + = note: forall<Self, S, T> { WellFormed(Unnormalized(<Self as Foo<S, T>>::Assoc)) :- Implemented(Self: Foo<S, T>). } error: aborting due to 2 previous errors diff --git a/src/test/ui/chalkify/lower_trait_higher_rank.rs b/src/test/ui/chalkify/lower_trait_higher_rank.rs index 7fc48cfd56d..c0e1d8fc4c8 100644 --- a/src/test/ui/chalkify/lower_trait_higher_rank.rs +++ b/src/test/ui/chalkify/lower_trait_higher_rank.rs @@ -11,9 +11,8 @@ #![feature(rustc_attrs)] #[rustc_dump_program_clauses] //~ ERROR program clause dump -trait Foo<F> where for<'a> F: Fn(&'a (u8, u16)) -> &'a u8 +trait Foo<F: ?Sized> where for<'a> F: Fn(&'a (u8, u16)) -> &'a u8 { - fn s(_: F) -> F; } fn main() { diff --git a/src/test/ui/chalkify/lower_trait_higher_rank.stderr b/src/test/ui/chalkify/lower_trait_higher_rank.stderr index afb2cd4b563..6d3e0ec55b2 100644 --- a/src/test/ui/chalkify/lower_trait_higher_rank.stderr +++ b/src/test/ui/chalkify/lower_trait_higher_rank.stderr @@ -4,11 +4,10 @@ error: program clause dump LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: FromEnv(F: std::marker::Sized) :- FromEnv(Self: Foo<F>). - = note: FromEnv(F: std::ops::Fn<(&'a (u8, u16),)>) :- FromEnv(Self: Foo<F>). - = note: Implemented(Self: Foo<F>) :- FromEnv(Self: Foo<F>). - = note: ProjectionEq(<F as std::ops::FnOnce<(&'a (u8, u16),)>>::Output == &'a u8) :- FromEnv(Self: Foo<F>). - = note: WellFormed(Self: Foo<F>) :- Implemented(Self: Foo<F>), WellFormed(F: std::marker::Sized), forall<> { WellFormed(F: std::ops::Fn<(&'a (u8, u16),)>) }, forall<> { ProjectionEq(<F as std::ops::FnOnce<(&'a (u8, u16),)>>::Output == &'a u8) }. + = note: forall<'a, Self, F> { FromEnv(F: std::ops::Fn<(&'a (u8, u16),)>) :- FromEnv(Self: Foo<F>). } + = note: forall<'a, Self, F> { ProjectionEq(<F as std::ops::FnOnce<(&'a (u8, u16),)>>::Output == &'a u8) :- FromEnv(Self: Foo<F>). } + = note: forall<Self, F> { Implemented(Self: Foo<F>) :- FromEnv(Self: Foo<F>). } + = note: forall<Self, F> { WellFormed(Self: Foo<F>) :- Implemented(Self: Foo<F>), forall<'a> { WellFormed(F: std::ops::Fn<(&'a (u8, u16),)>) }, forall<'a> { ProjectionEq(<F as std::ops::FnOnce<(&'a (u8, u16),)>>::Output == &'a u8) }. } error: aborting due to previous error diff --git a/src/test/ui/chalkify/lower_trait_where_clause.rs b/src/test/ui/chalkify/lower_trait_where_clause.rs index 5305591b843..ac58c0bf2fe 100644 --- a/src/test/ui/chalkify/lower_trait_where_clause.rs +++ b/src/test/ui/chalkify/lower_trait_where_clause.rs @@ -10,22 +10,16 @@ #![feature(rustc_attrs)] -use std::fmt::{Debug, Display}; use std::borrow::Borrow; #[rustc_dump_program_clauses] //~ ERROR program clause dump -trait Foo<'a, 'b, S, T, U> +trait Foo<'a, 'b, T, U> where - S: Debug, - T: Borrow<U>, - U: ?Sized, + T: Borrow<U> + ?Sized, + U: ?Sized + 'b, 'a: 'b, - U: 'b, - Vec<T>:, // NOTE(#53696) this checks an empty list of bounds. + Box<T>:, // NOTE(#53696) this checks an empty list of bounds. { - fn s(_: S) -> S; - fn t(_: T) -> T; - fn u(_: U) -> U; } fn main() { diff --git a/src/test/ui/chalkify/lower_trait_where_clause.stderr b/src/test/ui/chalkify/lower_trait_where_clause.stderr index ad3546da1a2..fcd516c89ba 100644 --- a/src/test/ui/chalkify/lower_trait_where_clause.stderr +++ b/src/test/ui/chalkify/lower_trait_where_clause.stderr @@ -1,18 +1,15 @@ error: program clause dump - --> $DIR/lower_trait_where_clause.rs:16:1 + --> $DIR/lower_trait_where_clause.rs:15:1 | LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: FromEnv(S: std::fmt::Debug) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). - = note: FromEnv(S: std::marker::Sized) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). - = note: FromEnv(T: std::borrow::Borrow<U>) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). - = note: FromEnv(T: std::marker::Sized) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). - = note: Implemented(Self: Foo<'a, 'b, S, T, U>) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). - = note: RegionOutlives('a : 'b) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). - = note: TypeOutlives(U : 'b) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). - = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), WellFormed(S: std::marker::Sized), WellFormed(T: std::marker::Sized), WellFormed(S: std::fmt::Debug), WellFormed(T: std::borrow::Borrow<U>), RegionOutlives('a : 'b), TypeOutlives(U : 'b), WellFormed(std::vec::Vec<T>). - = note: WellFormed(std::vec::Vec<T>) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). + = note: forall<'a, 'b, Self, T, U> { FromEnv(T: std::borrow::Borrow<U>) :- FromEnv(Self: Foo<'a, 'b, T, U>). } + = note: forall<'a, 'b, Self, T, U> { Implemented(Self: Foo<'a, 'b, T, U>) :- FromEnv(Self: Foo<'a, 'b, T, U>). } + = note: forall<'a, 'b, Self, T, U> { RegionOutlives('a: 'b) :- FromEnv(Self: Foo<'a, 'b, T, U>). } + = note: forall<'a, 'b, Self, T, U> { TypeOutlives(U: 'b) :- FromEnv(Self: Foo<'a, 'b, T, U>). } + = note: forall<'a, 'b, Self, T, U> { TypeOutlives(std::boxed::Box<T>: '<empty>) :- FromEnv(Self: Foo<'a, 'b, T, U>). } + = note: forall<'a, 'b, Self, T, U> { WellFormed(Self: Foo<'a, 'b, T, U>) :- Implemented(Self: Foo<'a, 'b, T, U>), WellFormed(T: std::borrow::Borrow<U>), TypeOutlives(U: 'b), RegionOutlives('a: 'b), TypeOutlives(std::boxed::Box<T>: '<empty>). } error: aborting due to previous error diff --git a/src/test/ui/nll/user-annotations/dump-fn-method.rs b/src/test/ui/nll/user-annotations/dump-fn-method.rs index 7f726d13a33..ef5fb8eadc3 100644 --- a/src/test/ui/nll/user-annotations/dump-fn-method.rs +++ b/src/test/ui/nll/user-annotations/dump-fn-method.rs @@ -39,7 +39,7 @@ fn main() { // Here: we only want the `T` to be given, the rest should be variables. // // (`T` refers to the declaration of `Bazoom`) - let x = <_ as Bazoom<u32>>::method::<_>; //~ ERROR [?0, u32, ?1] + let x = <_ as Bazoom<u32>>::method::<_>; //~ ERROR [^0, u32, ^1] x(&22, 44, 66); // Here: all are given @@ -51,7 +51,7 @@ fn main() { // // (`U` refers to the declaration of `Bazoom`) let y = 22_u32; - y.method::<u32>(44, 66); //~ ERROR [?0, ?1, u32] + y.method::<u32>(44, 66); //~ ERROR [^0, ^1, u32] // Here: nothing is given, so we don't have any annotation. let y = 22_u32; diff --git a/src/test/ui/nll/user-annotations/dump-fn-method.stderr b/src/test/ui/nll/user-annotations/dump-fn-method.stderr index 3beb994a4e8..359423d0cfb 100644 --- a/src/test/ui/nll/user-annotations/dump-fn-method.stderr +++ b/src/test/ui/nll/user-annotations/dump-fn-method.stderr @@ -4,10 +4,10 @@ error: user substs: Canonical { max_universe: U0, variables: [], value: UserSubs LL | let x = foo::<u32>; //~ ERROR [u32] | ^^^^^^^^^^ -error: user substs: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General) }, CanonicalVarInfo { kind: Ty(General) }], value: UserSubsts { substs: [?0, u32, ?1], user_self_ty: None } } +error: user substs: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General) }, CanonicalVarInfo { kind: Ty(General) }], value: UserSubsts { substs: [^0, u32, ^1], user_self_ty: None } } --> $DIR/dump-fn-method.rs:42:13 | -LL | let x = <_ as Bazoom<u32>>::method::<_>; //~ ERROR [?0, u32, ?1] +LL | let x = <_ as Bazoom<u32>>::method::<_>; //~ ERROR [^0, u32, ^1] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: user substs: Canonical { max_universe: U0, variables: [], value: UserSubsts { substs: [u8, u16, u32], user_self_ty: None } } @@ -16,10 +16,10 @@ error: user substs: Canonical { max_universe: U0, variables: [], value: UserSubs LL | let x = <u8 as Bazoom<u16>>::method::<u32>; //~ ERROR [u8, u16, u32] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: user substs: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General) }, CanonicalVarInfo { kind: Ty(General) }], value: UserSubsts { substs: [?0, ?1, u32], user_self_ty: None } } +error: user substs: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General) }, CanonicalVarInfo { kind: Ty(General) }], value: UserSubsts { substs: [^0, ^1, u32], user_self_ty: None } } --> $DIR/dump-fn-method.rs:54:5 | -LL | y.method::<u32>(44, 66); //~ ERROR [?0, ?1, u32] +LL | y.method::<u32>(44, 66); //~ ERROR [^0, ^1, u32] | ^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 4 previous errors |
