address review
This commit is contained in:
parent
897adb8666
commit
6118ee343f
108 changed files with 214 additions and 213 deletions
|
@ -2128,7 +2128,7 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
|
|||
if let Some(name) = available_names.pop() {
|
||||
name
|
||||
} else {
|
||||
Symbol::intern(&format!("'t{}", index - num_available))
|
||||
Symbol::intern(&format!("'z{}", index - num_available))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2161,7 +2161,8 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
|
|||
|
||||
define_scoped_cx!(self);
|
||||
|
||||
let possible_names = vec![Symbol::intern("'t"), Symbol::intern("'s"), Symbol::intern("'r")];
|
||||
let possible_names =
|
||||
('a'..='z').rev().map(|s| Symbol::intern(&format!("'{s}"))).collect::<Vec<_>>();
|
||||
|
||||
let mut available_names = possible_names
|
||||
.into_iter()
|
||||
|
|
|
@ -1462,7 +1462,7 @@ impl<'tcx> Region<'tcx> {
|
|||
ty::ReEarlyBound(ebr) => Some(ebr.name),
|
||||
ty::ReLateBound(_, br) => br.kind.get_name(),
|
||||
ty::ReFree(fr) => fr.bound_region.get_name(),
|
||||
ty::ReStatic => Some(Symbol::intern("static")),
|
||||
ty::ReStatic => Some(kw::StaticLifetime),
|
||||
ty::RePlaceholder(placeholder) => placeholder.name.get_name(),
|
||||
_ => None,
|
||||
};
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
_2 = <T as Clone>::clone(move _3) -> bb1; // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
|
||||
// mir::Constant
|
||||
// + span: $DIR/combine_clone_of_primitives.rs:8:5: 8:9
|
||||
// + literal: Const { ty: for<'r> fn(&'r T) -> T {<T as Clone>::clone}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> fn(&'a T) -> T {<T as Clone>::clone}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
|
@ -37,7 +37,7 @@
|
|||
- _5 = <u64 as Clone>::clone(move _6) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/combine_clone_of_primitives.rs:9:5: 9:11
|
||||
- // + literal: Const { ty: for<'r> fn(&'r u64) -> u64 {<u64 as Clone>::clone}, val: Value(<ZST>) }
|
||||
- // + literal: Const { ty: for<'a> fn(&'a u64) -> u64 {<u64 as Clone>::clone}, val: Value(<ZST>) }
|
||||
+ _6 = _7; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
|
||||
+ _5 = (*_6); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
|
||||
+ goto -> bb2; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
|
||||
|
@ -53,7 +53,7 @@
|
|||
- _8 = <[f32; 3] as Clone>::clone(move _9) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/combine_clone_of_primitives.rs:10:5: 10:16
|
||||
- // + literal: Const { ty: for<'r> fn(&'r [f32; 3]) -> [f32; 3] {<[f32; 3] as Clone>::clone}, val: Value(<ZST>) }
|
||||
- // + literal: Const { ty: for<'a> fn(&'a [f32; 3]) -> [f32; 3] {<[f32; 3] as Clone>::clone}, val: Value(<ZST>) }
|
||||
+ _9 = _10; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
|
||||
+ _8 = (*_9); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
|
||||
+ goto -> bb3; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
_0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
|
||||
// mir::Constant
|
||||
// + span: $DIR/const-promotion-extern-static.rs:9:36: 9:42
|
||||
// + literal: Const { ty: for<'r> fn(&'r [&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> fn(&'a [&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
_0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
|
||||
// mir::Constant
|
||||
// + span: $DIR/const-promotion-extern-static.rs:13:47: 13:53
|
||||
// + literal: Const { ty: for<'r> fn(&'r [&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> fn(&'a [&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
_2 = core::str::<impl str>::as_bytes(move _3) -> bb1; // scope 0 at $DIR/deduplicate_blocks.rs:+1:11: +1:23
|
||||
// mir::Constant
|
||||
// + span: $DIR/deduplicate_blocks.rs:5:13: 5:21
|
||||
// + literal: Const { ty: for<'r> fn(&'r str) -> &'r [u8] {core::str::<impl str>::as_bytes}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> fn(&'a str) -> &'a [u8] {core::str::<impl str>::as_bytes}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
_7 = <std::slice::Iter<'_, i32> as Iterator>::next(move _8) -> bb3; // scope 1 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
// mir::Constant
|
||||
// + span: $DIR/derefer_complex_case.rs:6:17: 6:26
|
||||
// + literal: Const { ty: for<'r> fn(&'r mut std::slice::Iter<'_, i32>) -> Option<<std::slice::Iter<'_, i32> as Iterator>::Item> {<std::slice::Iter<'_, i32> as Iterator>::next}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> fn(&'a mut std::slice::Iter<'_, i32>) -> Option<<std::slice::Iter<'_, i32> as Iterator>::Item> {<std::slice::Iter<'_, i32> as Iterator>::next}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb3: {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
- // MIR for `nrvo` before DestinationPropagation
|
||||
+ // MIR for `nrvo` after DestinationPropagation
|
||||
|
||||
fn nrvo(_1: for<'r> fn(&'r mut [u8; 1024])) -> [u8; 1024] {
|
||||
fn nrvo(_1: for<'a> fn(&'a mut [u8; 1024])) -> [u8; 1024] {
|
||||
debug init => _1; // in scope 0 at $DIR/simple.rs:+0:9: +0:13
|
||||
let mut _0: [u8; 1024]; // return place in scope 0 at $DIR/simple.rs:+0:39: +0:49
|
||||
let mut _2: [u8; 1024]; // in scope 0 at $DIR/simple.rs:+1:9: +1:16
|
||||
let _3: (); // in scope 0 at $DIR/simple.rs:+2:5: +2:19
|
||||
let mut _4: for<'r> fn(&'r mut [u8; 1024]); // in scope 0 at $DIR/simple.rs:+2:5: +2:9
|
||||
let mut _4: for<'a> fn(&'a mut [u8; 1024]); // in scope 0 at $DIR/simple.rs:+2:5: +2:9
|
||||
let mut _5: &mut [u8; 1024]; // in scope 0 at $DIR/simple.rs:+2:10: +2:18
|
||||
let mut _6: &mut [u8; 1024]; // in scope 0 at $DIR/simple.rs:+2:10: +2:18
|
||||
scope 1 {
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
_4 = Formatter::<'_>::sign_plus(move _5) -> bb1; // scope 0 at $DIR/funky_arms.rs:+4:22: +4:37
|
||||
// mir::Constant
|
||||
// + span: $DIR/funky_arms.rs:15:26: 15:35
|
||||
// + literal: Const { ty: for<'r> fn(&'r Formatter<'_>) -> bool {Formatter::<'_>::sign_plus}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> fn(&'a Formatter<'_>) -> bool {Formatter::<'_>::sign_plus}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
|
@ -69,7 +69,7 @@
|
|||
_7 = Formatter::<'_>::precision(move _8) -> bb5; // scope 3 at $DIR/funky_arms.rs:+13:30: +13:45
|
||||
// mir::Constant
|
||||
// + span: $DIR/funky_arms.rs:24:34: 24:43
|
||||
// + literal: Const { ty: for<'r> fn(&'r Formatter<'_>) -> Option<usize> {Formatter::<'_>::precision}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> fn(&'a Formatter<'_>) -> Option<usize> {Formatter::<'_>::precision}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb5: {
|
||||
|
@ -100,7 +100,7 @@
|
|||
_0 = float_to_exponential_common_exact::<T>(move _11, move _12, move _13, move _14, move _17) -> bb7; // scope 3 at $DIR/funky_arms.rs:+15:9: +15:87
|
||||
// mir::Constant
|
||||
// + span: $DIR/funky_arms.rs:26:9: 26:42
|
||||
// + literal: Const { ty: for<'r, 's, 't> fn(&'r mut Formatter<'s>, &'t T, Sign, u32, bool) -> Result<(), std::fmt::Error> {float_to_exponential_common_exact::<T>}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a, 'b, 'c> fn(&'a mut Formatter<'b>, &'c T, Sign, u32, bool) -> Result<(), std::fmt::Error> {float_to_exponential_common_exact::<T>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb7: {
|
||||
|
@ -125,7 +125,7 @@
|
|||
_0 = float_to_exponential_common_shortest::<T>(move _18, move _19, move _20, move _21) -> bb9; // scope 2 at $DIR/funky_arms.rs:+17:9: +17:68
|
||||
// mir::Constant
|
||||
// + span: $DIR/funky_arms.rs:28:9: 28:45
|
||||
// + literal: Const { ty: for<'r, 's, 't> fn(&'r mut Formatter<'s>, &'t T, Sign, bool) -> Result<(), std::fmt::Error> {float_to_exponential_common_shortest::<T>}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a, 'b, 'c> fn(&'a mut Formatter<'b>, &'c T, Sign, bool) -> Result<(), std::fmt::Error> {float_to_exponential_common_shortest::<T>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb9: {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
_2 = <impl Fn() as Fn<()>>::call(move _3, move _4) -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/cycle.rs:+1:5: +1:8
|
||||
// mir::Constant
|
||||
// + span: $DIR/cycle.rs:6:5: 6:6
|
||||
// + literal: Const { ty: for<'r> extern "rust-call" fn(&'r impl Fn(), ()) -> <impl Fn() as FnOnce<()>>::Output {<impl Fn() as Fn<()>>::call}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> extern "rust-call" fn(&'a impl Fn(), ()) -> <impl Fn() as FnOnce<()>>::Output {<impl Fn() as Fn<()>>::call}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
// mir::Constant
|
||||
// + span: $DIR/dyn-trait.rs:33:13: 33:21
|
||||
// + user_ty: UserType(0)
|
||||
// + literal: Const { ty: for<'r> fn(&'r T) -> &'r <Q as Query>::C {<Q as Query>::cache::<T>}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> fn(&'a T) -> &'a <Q as Query>::C {<Q as Query>::cache::<T>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
|
@ -46,9 +46,9 @@
|
|||
+ _0 = <dyn Cache<V = <Q as Query>::V> as Cache>::store_nocache(move _7) -> bb2; // scope 3 at $DIR/dyn-trait.rs:21:5: 21:22
|
||||
// mir::Constant
|
||||
- // + span: $DIR/dyn-trait.rs:34:5: 34:22
|
||||
- // + literal: Const { ty: for<'r> fn(&'r <Q as Query>::C) {try_execute_query::<<Q as Query>::C>}, val: Value(<ZST>) }
|
||||
- // + literal: Const { ty: for<'a> fn(&'a <Q as Query>::C) {try_execute_query::<<Q as Query>::C>}, val: Value(<ZST>) }
|
||||
+ // + span: $DIR/dyn-trait.rs:21:7: 21:20
|
||||
+ // + literal: Const { ty: for<'r> fn(&'r dyn Cache<V = <Q as Query>::V>) {<dyn Cache<V = <Q as Query>::V> as Cache>::store_nocache}, val: Value(<ZST>) }
|
||||
+ // + literal: Const { ty: for<'a> fn(&'a dyn Cache<V = <Q as Query>::V>) {<dyn Cache<V = <Q as Query>::V> as Cache>::store_nocache}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb2: {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
_0 = <dyn Cache<V = V> as Cache>::store_nocache(move _2) -> bb1; // scope 0 at $DIR/dyn-trait.rs:+1:5: +1:22
|
||||
// mir::Constant
|
||||
// + span: $DIR/dyn-trait.rs:21:7: 21:20
|
||||
// + literal: Const { ty: for<'r> fn(&'r dyn Cache<V = V>) {<dyn Cache<V = V> as Cache>::store_nocache}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> fn(&'a dyn Cache<V = V>) {<dyn Cache<V = V> as Cache>::store_nocache}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
+ _0 = <dyn Cache<V = <C as Cache>::V> as Cache>::store_nocache(move _4) -> bb1; // scope 1 at $DIR/dyn-trait.rs:21:5: 21:22
|
||||
// mir::Constant
|
||||
- // + span: $DIR/dyn-trait.rs:27:5: 27:13
|
||||
- // + literal: Const { ty: for<'r> fn(&'r (dyn Cache<V = <C as Cache>::V> + 'r)) {mk_cycle::<<C as Cache>::V>}, val: Value(<ZST>) }
|
||||
- // + literal: Const { ty: for<'a> fn(&'a (dyn Cache<V = <C as Cache>::V> + 'a)) {mk_cycle::<<C as Cache>::V>}, val: Value(<ZST>) }
|
||||
+ // + span: $DIR/dyn-trait.rs:21:7: 21:20
|
||||
+ // + literal: Const { ty: for<'r> fn(&'r dyn Cache<V = <C as Cache>::V>) {<dyn Cache<V = <C as Cache>::V> as Cache>::store_nocache}, val: Value(<ZST>) }
|
||||
+ // + literal: Const { ty: for<'a> fn(&'a dyn Cache<V = <C as Cache>::V>) {<dyn Cache<V = <C as Cache>::V> as Cache>::store_nocache}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
- _1 = <[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator<bool>>::resume(move _2, const false) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/inline-generator.rs:+1:14: +1:46
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/inline-generator.rs:9:33: 9:39
|
||||
- // + literal: Const { ty: for<'r> fn(Pin<&'r mut [generator@$DIR/inline-generator.rs:15:5: 15:8]>, bool) -> GeneratorState<<[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator<bool>>::Yield, <[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator<bool>>::Return> {<[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator<bool>>::resume}, val: Value(<ZST>) }
|
||||
- // + literal: Const { ty: for<'a> fn(Pin<&'a mut [generator@$DIR/inline-generator.rs:15:5: 15:8]>, bool) -> GeneratorState<<[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator<bool>>::Yield, <[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator<bool>>::Return> {<[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator<bool>>::resume}, val: Value(<ZST>) }
|
||||
+ StorageLive(_7); // scope 0 at $DIR/inline-generator.rs:+1:14: +1:46
|
||||
+ _7 = const false; // scope 0 at $DIR/inline-generator.rs:+1:14: +1:46
|
||||
+ StorageLive(_10); // scope 0 at $DIR/inline-generator.rs:+1:14: +1:46
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
fn bar() -> bool {
|
||||
let mut _0: bool; // return place in scope 0 at $DIR/inline-retag.rs:+0:13: +0:17
|
||||
let _1: for<'r, 's> fn(&'r i32, &'s i32) -> bool {foo}; // in scope 0 at $DIR/inline-retag.rs:+1:9: +1:10
|
||||
let mut _2: for<'r, 's> fn(&'r i32, &'s i32) -> bool {foo}; // in scope 0 at $DIR/inline-retag.rs:+2:5: +2:6
|
||||
let _1: for<'a, 'b> fn(&'a i32, &'b i32) -> bool {foo}; // in scope 0 at $DIR/inline-retag.rs:+1:9: +1:10
|
||||
let mut _2: for<'a, 'b> fn(&'a i32, &'b i32) -> bool {foo}; // in scope 0 at $DIR/inline-retag.rs:+2:5: +2:6
|
||||
let mut _3: &i32; // in scope 0 at $DIR/inline-retag.rs:+2:7: +2:9
|
||||
let _4: &i32; // in scope 0 at $DIR/inline-retag.rs:+2:7: +2:9
|
||||
let _5: i32; // in scope 0 at $DIR/inline-retag.rs:+2:8: +2:9
|
||||
|
@ -27,7 +27,7 @@ fn bar() -> bool {
|
|||
_1 = foo; // scope 0 at $DIR/inline-retag.rs:+1:13: +1:16
|
||||
// mir::Constant
|
||||
// + span: $DIR/inline-retag.rs:11:13: 11:16
|
||||
// + literal: Const { ty: for<'r, 's> fn(&'r i32, &'s i32) -> bool {foo}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a, 'b> fn(&'a i32, &'b i32) -> bool {foo}, val: Value(<ZST>) }
|
||||
StorageLive(_2); // scope 1 at $DIR/inline-retag.rs:+2:5: +2:6
|
||||
_2 = _1; // scope 1 at $DIR/inline-retag.rs:+2:5: +2:6
|
||||
StorageLive(_3); // scope 1 at $DIR/inline-retag.rs:+2:7: +2:9
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
- _0 = <fn(A, B) as Clone>::clone(move _2) -> bb1; // scope 0 at $DIR/inline-shims.rs:+1:5: +1:14
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/inline-shims.rs:6:7: 6:12
|
||||
- // + literal: Const { ty: for<'r> fn(&'r fn(A, B)) -> fn(A, B) {<fn(A, B) as Clone>::clone}, val: Value(<ZST>) }
|
||||
- // + literal: Const { ty: for<'a> fn(&'a fn(A, B)) -> fn(A, B) {<fn(A, B) as Clone>::clone}, val: Value(<ZST>) }
|
||||
- }
|
||||
-
|
||||
- bb1: {
|
||||
|
|
|
@ -11,7 +11,7 @@ fn test(_1: &dyn X) -> u32 {
|
|||
_0 = <dyn X as X>::y(move _2) -> bb1; // scope 0 at $DIR/inline-trait-method.rs:+1:5: +1:10
|
||||
// mir::Constant
|
||||
// + span: $DIR/inline-trait-method.rs:9:7: 9:8
|
||||
// + literal: Const { ty: for<'r> fn(&'r dyn X) -> u32 {<dyn X as X>::y}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> fn(&'a dyn X) -> u32 {<dyn X as X>::y}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
|
|
|
@ -21,7 +21,7 @@ fn test2(_1: &dyn X) -> bool {
|
|||
_0 = <dyn X as X>::y(move _4) -> bb1; // scope 1 at $DIR/inline-trait-method_2.rs:10:5: 10:10
|
||||
// mir::Constant
|
||||
// + span: $DIR/inline-trait-method_2.rs:10:7: 10:8
|
||||
// + literal: Const { ty: for<'r> fn(&'r dyn X) -> bool {<dyn X as X>::y}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> fn(&'a dyn X) -> bool {<dyn X as X>::y}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
- _2 = <fn() {foo} as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:+4:5: +4:17
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/issue-78442.rs:11:5: 11:15
|
||||
- // + literal: Const { ty: for<'r> extern "rust-call" fn(&'r fn() {foo}, ()) -> <fn() {foo} as FnOnce<()>>::Output {<fn() {foo} as Fn<()>>::call}, val: Value(<ZST>) }
|
||||
- // + literal: Const { ty: for<'a> extern "rust-call" fn(&'a fn() {foo}, ()) -> <fn() {foo} as FnOnce<()>>::Output {<fn() {foo} as Fn<()>>::call}, val: Value(<ZST>) }
|
||||
+ _2 = move (*_3)() -> [return: bb5, unwind: bb3]; // scope 1 at $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||
}
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
+ _2 = <fn() {foo} as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:+4:5: +4:17
|
||||
// mir::Constant
|
||||
// + span: $DIR/issue-78442.rs:11:5: 11:15
|
||||
- // + literal: Const { ty: for<'r> extern "rust-call" fn(&'r impl Fn(), ()) -> <impl Fn() as FnOnce<()>>::Output {<impl Fn() as Fn<()>>::call}, val: Value(<ZST>) }
|
||||
+ // + literal: Const { ty: for<'r> extern "rust-call" fn(&'r fn() {foo}, ()) -> <fn() {foo} as FnOnce<()>>::Output {<fn() {foo} as Fn<()>>::call}, val: Value(<ZST>) }
|
||||
- // + literal: Const { ty: for<'a> extern "rust-call" fn(&'a impl Fn(), ()) -> <impl Fn() as FnOnce<()>>::Output {<impl Fn() as Fn<()>>::call}, val: Value(<ZST>) }
|
||||
+ // + literal: Const { ty: for<'a> extern "rust-call" fn(&'a fn() {foo}, ()) -> <fn() {foo} as FnOnce<()>>::Output {<fn() {foo} as Fn<()>>::call}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb2: {
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
_21 = core::panicking::assert_failed::<i32, i32>(const core::panicking::AssertKind::Eq, move _23, move _25, move _27); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: for<'r, 's, 't> fn(core::panicking::AssertKind, &'r i32, &'s i32, Option<Arguments<'t>>) -> ! {core::panicking::assert_failed::<i32, i32>}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a, 'b, 'c> fn(core::panicking::AssertKind, &'a i32, &'b i32, Option<Arguments<'c>>) -> ! {core::panicking::assert_failed::<i32, i32>}, val: Value(<ZST>) }
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: core::panicking::AssertKind, val: Value(Scalar(0x00)) }
|
||||
|
|
|
@ -15,7 +15,7 @@ fn bar(_1: Box<[T]>) -> () {
|
|||
_2 = <[T] as Index<usize>>::index(move _3, const 0_usize) -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/issue-91633.rs:+4:14: +4:19
|
||||
// mir::Constant
|
||||
// + span: $DIR/issue-91633.rs:15:14: 15:19
|
||||
// + literal: Const { ty: for<'r> fn(&'r [T], usize) -> &'r <[T] as Index<usize>>::Output {<[T] as Index<usize>>::index}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> fn(&'a [T], usize) -> &'a <[T] as Index<usize>>::Output {<[T] as Index<usize>>::index}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
|
|
|
@ -27,7 +27,7 @@ fn foo(_1: Box<[T]>) -> T {
|
|||
_2 = <T as Clone>::clone(move _3) -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/issue-91633.rs:+2:14: +2:27
|
||||
// mir::Constant
|
||||
// + span: $DIR/issue-91633.rs:28:20: 28:25
|
||||
// + literal: Const { ty: for<'r> fn(&'r T) -> T {<T as Clone>::clone}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> fn(&'a T) -> T {<T as Clone>::clone}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb2: {
|
||||
|
|
|
@ -17,7 +17,7 @@ fn hey(_1: &[T]) -> () {
|
|||
_3 = <[T] as Index<usize>>::index(move _4, const 0_usize) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/issue-91633.rs:+4:15: +4:20
|
||||
// mir::Constant
|
||||
// + span: $DIR/issue-91633.rs:7:15: 7:20
|
||||
// + literal: Const { ty: for<'r> fn(&'r [T], usize) -> &'r <[T] as Index<usize>>::Output {<[T] as Index<usize>>::index}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> fn(&'a [T], usize) -> &'a <[T] as Index<usize>>::Output {<[T] as Index<usize>>::index}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
|
|
|
@ -101,7 +101,7 @@ fn main() -> () {
|
|||
_11 = <&[u8] as PartialEq<&[u8; 4]>>::eq(move _12, move _13) -> [return: bb2, unwind: bb19]; // scope 1 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: for<'r, 's> fn(&'r &[u8], &'s &[u8; 4]) -> bool {<&[u8] as PartialEq<&[u8; 4]>>::eq}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a, 'b> fn(&'a &[u8], &'b &[u8; 4]) -> bool {<&[u8] as PartialEq<&[u8; 4]>>::eq}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb2: {
|
||||
|
@ -132,7 +132,7 @@ fn main() -> () {
|
|||
_16 = core::panicking::assert_failed::<&[u8], &[u8; 4]>(move _17, move _18, move _20, move _22) -> bb19; // scope 2 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: for<'r, 's, 't> fn(core::panicking::AssertKind, &'r &[u8], &'s &[u8; 4], Option<Arguments<'t>>) -> ! {core::panicking::assert_failed::<&[u8], &[u8; 4]>}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a, 'b, 'c> fn(core::panicking::AssertKind, &'a &[u8], &'b &[u8; 4], Option<Arguments<'c>>) -> ! {core::panicking::assert_failed::<&[u8], &[u8; 4]>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb4: {
|
||||
|
@ -210,7 +210,7 @@ fn main() -> () {
|
|||
_32 = <&[u8] as PartialEq<&[u8; 4]>>::eq(move _33, move _34) -> [return: bb11, unwind: bb19]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: for<'r, 's> fn(&'r &[u8], &'s &[u8; 4]) -> bool {<&[u8] as PartialEq<&[u8; 4]>>::eq}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a, 'b> fn(&'a &[u8], &'b &[u8; 4]) -> bool {<&[u8] as PartialEq<&[u8; 4]>>::eq}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb11: {
|
||||
|
@ -241,7 +241,7 @@ fn main() -> () {
|
|||
_37 = core::panicking::assert_failed::<&[u8], &[u8; 4]>(move _38, move _39, move _41, move _43) -> bb19; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: for<'r, 's, 't> fn(core::panicking::AssertKind, &'r &[u8], &'s &[u8; 4], Option<Arguments<'t>>) -> ! {core::panicking::assert_failed::<&[u8], &[u8; 4]>}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a, 'b, 'c> fn(core::panicking::AssertKind, &'a &[u8], &'b &[u8; 4], Option<Arguments<'c>>) -> ! {core::panicking::assert_failed::<&[u8], &[u8; 4]>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb13: {
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
- _2 = discriminant_value::<T>(move _3) -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:45
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/lower_intrinsics.rs:49:5: 49:41
|
||||
- // + literal: Const { ty: for<'r> extern "rust-intrinsic" fn(&'r T) -> <T as DiscriminantKind>::Discriminant {discriminant_value::<T>}, val: Value(<ZST>) }
|
||||
- // + literal: Const { ty: for<'a> extern "rust-intrinsic" fn(&'a T) -> <T as DiscriminantKind>::Discriminant {discriminant_value::<T>}, val: Value(<ZST>) }
|
||||
+ _2 = discriminant((*_3)); // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:45
|
||||
+ goto -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:45
|
||||
}
|
||||
|
@ -53,7 +53,7 @@
|
|||
- _5 = discriminant_value::<i32>(move _6) -> bb2; // scope 0 at $DIR/lower_intrinsics.rs:+2:5: +2:45
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/lower_intrinsics.rs:50:5: 50:41
|
||||
- // + literal: Const { ty: for<'r> extern "rust-intrinsic" fn(&'r i32) -> <i32 as DiscriminantKind>::Discriminant {discriminant_value::<i32>}, val: Value(<ZST>) }
|
||||
- // + literal: Const { ty: for<'a> extern "rust-intrinsic" fn(&'a i32) -> <i32 as DiscriminantKind>::Discriminant {discriminant_value::<i32>}, val: Value(<ZST>) }
|
||||
+ _5 = discriminant((*_6)); // scope 0 at $DIR/lower_intrinsics.rs:+2:5: +2:45
|
||||
+ goto -> bb2; // scope 0 at $DIR/lower_intrinsics.rs:+2:5: +2:45
|
||||
}
|
||||
|
@ -74,7 +74,7 @@
|
|||
- _9 = discriminant_value::<()>(move _10) -> bb3; // scope 0 at $DIR/lower_intrinsics.rs:+3:5: +3:46
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/lower_intrinsics.rs:51:5: 51:41
|
||||
- // + literal: Const { ty: for<'r> extern "rust-intrinsic" fn(&'r ()) -> <() as DiscriminantKind>::Discriminant {discriminant_value::<()>}, val: Value(<ZST>) }
|
||||
- // + literal: Const { ty: for<'a> extern "rust-intrinsic" fn(&'a ()) -> <() as DiscriminantKind>::Discriminant {discriminant_value::<()>}, val: Value(<ZST>) }
|
||||
+ _9 = discriminant((*_10)); // scope 0 at $DIR/lower_intrinsics.rs:+3:5: +3:46
|
||||
+ goto -> bb3; // scope 0 at $DIR/lower_intrinsics.rs:+3:5: +3:46
|
||||
}
|
||||
|
@ -95,7 +95,7 @@
|
|||
- _13 = discriminant_value::<E>(move _14) -> bb4; // scope 0 at $DIR/lower_intrinsics.rs:+4:5: +4:48
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/lower_intrinsics.rs:52:5: 52:41
|
||||
- // + literal: Const { ty: for<'r> extern "rust-intrinsic" fn(&'r E) -> <E as DiscriminantKind>::Discriminant {discriminant_value::<E>}, val: Value(<ZST>) }
|
||||
- // + literal: Const { ty: for<'a> extern "rust-intrinsic" fn(&'a E) -> <E as DiscriminantKind>::Discriminant {discriminant_value::<E>}, val: Value(<ZST>) }
|
||||
+ _13 = discriminant((*_14)); // scope 0 at $DIR/lower_intrinsics.rs:+4:5: +4:48
|
||||
+ goto -> bb4; // scope 0 at $DIR/lower_intrinsics.rs:+4:5: +4:48
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
- _5 = core::slice::<impl [u8]>::len(move _6) -> bb1; // scope 0 at $DIR/lower_slice_len.rs:+1:16: +1:27
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/lower_slice_len.rs:5:22: 5:25
|
||||
- // + literal: Const { ty: for<'r> fn(&'r [u8]) -> usize {core::slice::<impl [u8]>::len}, val: Value(<ZST>) }
|
||||
- // + literal: Const { ty: for<'a> fn(&'a [u8]) -> usize {core::slice::<impl [u8]>::len}, val: Value(<ZST>) }
|
||||
+ _5 = Len((*_6)); // scope 0 at $DIR/lower_slice_len.rs:+1:16: +1:27
|
||||
+ goto -> bb1; // scope 0 at $DIR/lower_slice_len.rs:+1:16: +1:27
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ fn main() -> () {
|
|||
_2 = <str as ToString>::to_string(move _3) -> bb1; // scope 0 at $DIR/no-spurious-drop-after-call.rs:+1:20: +1:34
|
||||
// mir::Constant
|
||||
// + span: $DIR/no-spurious-drop-after-call.rs:9:23: 9:32
|
||||
// + literal: Const { ty: for<'r> fn(&'r str) -> String {<str as ToString>::to_string}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> fn(&'a str) -> String {<str as ToString>::to_string}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
- // MIR for `nrvo` before RenameReturnPlace
|
||||
+ // MIR for `nrvo` after RenameReturnPlace
|
||||
|
||||
fn nrvo(_1: for<'r> fn(&'r mut [u8; 1024])) -> [u8; 1024] {
|
||||
fn nrvo(_1: for<'a> fn(&'a mut [u8; 1024])) -> [u8; 1024] {
|
||||
debug init => _1; // in scope 0 at $DIR/nrvo-simple.rs:+0:9: +0:13
|
||||
- let mut _0: [u8; 1024]; // return place in scope 0 at $DIR/nrvo-simple.rs:+0:39: +0:49
|
||||
+ let mut _0: [u8; 1024]; // return place in scope 0 at $DIR/nrvo-simple.rs:+1:9: +1:16
|
||||
let mut _2: [u8; 1024]; // in scope 0 at $DIR/nrvo-simple.rs:+1:9: +1:16
|
||||
let _3: (); // in scope 0 at $DIR/nrvo-simple.rs:+2:5: +2:19
|
||||
let mut _4: for<'r> fn(&'r mut [u8; 1024]); // in scope 0 at $DIR/nrvo-simple.rs:+2:5: +2:9
|
||||
let mut _4: for<'a> fn(&'a mut [u8; 1024]); // in scope 0 at $DIR/nrvo-simple.rs:+2:5: +2:9
|
||||
let mut _5: &mut [u8; 1024]; // in scope 0 at $DIR/nrvo-simple.rs:+2:10: +2:18
|
||||
let mut _6: &mut [u8; 1024]; // in scope 0 at $DIR/nrvo-simple.rs:+2:10: +2:18
|
||||
scope 1 {
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
_7 = <std::ops::Range<i32> as Iterator>::next(move _8) -> bb3; // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
|
||||
// mir::Constant
|
||||
// + span: $DIR/remove_storage_markers.rs:10:14: 10:19
|
||||
// + literal: Const { ty: for<'r> fn(&'r mut std::ops::Range<i32>) -> Option<<std::ops::Range<i32> as Iterator>::Item> {<std::ops::Range<i32> as Iterator>::next}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> fn(&'a mut std::ops::Range<i32>) -> Option<<std::ops::Range<i32> as Iterator>::Item> {<std::ops::Range<i32> as Iterator>::next}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb3: {
|
||||
|
|
|
@ -180,7 +180,7 @@ fn array_casts() -> () {
|
|||
_28 = core::panicking::assert_failed::<usize, usize>(move _29, move _30, move _32, move _34); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: for<'r, 's, 't> fn(core::panicking::AssertKind, &'r usize, &'s usize, Option<Arguments<'t>>) -> ! {core::panicking::assert_failed::<usize, usize>}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a, 'b, 'c> fn(core::panicking::AssertKind, &'a usize, &'b usize, Option<Arguments<'c>>) -> ! {core::panicking::assert_failed::<usize, usize>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb4: {
|
||||
|
|
|
@ -11,7 +11,7 @@ fn std::ptr::drop_in_place(_1: *mut Test) -> () {
|
|||
_3 = <Test as Drop>::drop(move _2) -> bb1; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:+0:1: +0:56
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
||||
// + literal: Const { ty: for<'r> fn(&'r mut Test) {<Test as Drop>::drop}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> fn(&'a mut Test) {<Test as Drop>::drop}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
|
|
|
@ -11,7 +11,7 @@ fn main() -> () {
|
|||
let mut _9: &mut i32; // in scope 0 at $DIR/retag.rs:+4:19: +4:20
|
||||
let mut _12: *mut i32; // in scope 0 at $DIR/retag.rs:+7:18: +7:29
|
||||
let mut _14: [closure@main::{closure#0}]; // in scope 0 at $DIR/retag.rs:+11:31: +14:6
|
||||
let mut _16: for<'r> fn(&'r i32) -> &'r i32; // in scope 0 at $DIR/retag.rs:+15:14: +15:15
|
||||
let mut _16: for<'a> fn(&'a i32) -> &'a i32; // in scope 0 at $DIR/retag.rs:+15:14: +15:15
|
||||
let mut _17: &i32; // in scope 0 at $DIR/retag.rs:+15:16: +15:18
|
||||
let _18: &i32; // in scope 0 at $DIR/retag.rs:+15:16: +15:18
|
||||
let _19: &i32; // in scope 0 at $DIR/retag.rs:+18:5: +18:24
|
||||
|
@ -25,7 +25,7 @@ fn main() -> () {
|
|||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/retag.rs:+1:9: +1:14
|
||||
let _3: &mut i32; // in scope 1 at $DIR/retag.rs:+3:13: +3:14
|
||||
let _13: for<'r> fn(&'r i32) -> &'r i32; // in scope 1 at $DIR/retag.rs:+11:9: +11:10
|
||||
let _13: for<'a> fn(&'a i32) -> &'a i32; // in scope 1 at $DIR/retag.rs:+11:9: +11:10
|
||||
scope 2 {
|
||||
debug v => _3; // in scope 2 at $DIR/retag.rs:+3:13: +3:14
|
||||
let _8: &mut i32; // in scope 2 at $DIR/retag.rs:+4:13: +4:14
|
||||
|
@ -75,7 +75,7 @@ fn main() -> () {
|
|||
_3 = Test::foo(move _4, move _6) -> [return: bb1, unwind: bb8]; // scope 1 at $DIR/retag.rs:+3:17: +3:36
|
||||
// mir::Constant
|
||||
// + span: $DIR/retag.rs:33:25: 33:28
|
||||
// + literal: Const { ty: for<'r, 'x> fn(&'r Test, &'x mut i32) -> &'x mut i32 {Test::foo}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a, 'x> fn(&'a Test, &'x mut i32) -> &'x mut i32 {Test::foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
|
@ -114,7 +114,7 @@ fn main() -> () {
|
|||
StorageLive(_14); // scope 1 at $DIR/retag.rs:+11:31: +14:6
|
||||
Deinit(_14); // scope 1 at $DIR/retag.rs:+11:31: +14:6
|
||||
Retag(_14); // scope 1 at $DIR/retag.rs:+11:31: +14:6
|
||||
_13 = move _14 as for<'r> fn(&'r i32) -> &'r i32 (Pointer(ClosureFnPointer(Normal))); // scope 1 at $DIR/retag.rs:+11:31: +14:6
|
||||
_13 = move _14 as for<'a> fn(&'a i32) -> &'a i32 (Pointer(ClosureFnPointer(Normal))); // scope 1 at $DIR/retag.rs:+11:31: +14:6
|
||||
StorageDead(_14); // scope 1 at $DIR/retag.rs:+11:47: +11:48
|
||||
StorageLive(_15); // scope 6 at $DIR/retag.rs:+15:9: +15:11
|
||||
StorageLive(_16); // scope 6 at $DIR/retag.rs:+15:14: +15:15
|
||||
|
@ -154,7 +154,7 @@ fn main() -> () {
|
|||
_19 = Test::foo_shr(move _20, move _22) -> [return: bb4, unwind: bb7]; // scope 7 at $DIR/retag.rs:+18:5: +18:24
|
||||
// mir::Constant
|
||||
// + span: $DIR/retag.rs:48:13: 48:20
|
||||
// + literal: Const { ty: for<'r, 'x> fn(&'r Test, &'x i32) -> &'x i32 {Test::foo_shr}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a, 'x> fn(&'a Test, &'x i32) -> &'x i32 {Test::foo_shr}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb4: {
|
||||
|
|
|
@ -34,6 +34,6 @@ fn std::ptr::drop_in_place(_1: *mut Vec<i32>) -> () {
|
|||
_3 = <Vec<i32> as Drop>::drop(move _2) -> [return: bb5, unwind: bb4]; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:+0:1: +0:56
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
||||
// + literal: Const { ty: for<'r> fn(&'r mut Vec<i32>) {<Vec<i32> as Drop>::drop}, val: Value(<ZST>) }
|
||||
// + literal: Const { ty: for<'a> fn(&'a mut Vec<i32>) {<Vec<i32> as Drop>::drop}, val: Value(<ZST>) }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ fn bar() ({
|
|||
({
|
||||
let res =
|
||||
((::alloc::fmt::format as
|
||||
for<'r> fn(Arguments<'r>) -> String {format})(((::core::fmt::Arguments::new_v1
|
||||
for<'a> fn(Arguments<'a>) -> String {format})(((::core::fmt::Arguments::new_v1
|
||||
as
|
||||
fn(&[&'static str], &[ArgumentV1<'_>]) -> Arguments<'_> {Arguments::<'_>::new_v1})((&([("test"
|
||||
as &str)] as [&str; 1]) as &[&str; 1]),
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | f1(|_: (), _: ()| {});
|
|||
| |
|
||||
| expected due to this
|
||||
|
|
||||
= note: expected closure signature `for<'r, 's> fn(&'r (), &'s ()) -> _`
|
||||
= note: expected closure signature `for<'a, 'b> fn(&'a (), &'b ()) -> _`
|
||||
found closure signature `fn((), ()) -> _`
|
||||
note: required by a bound in `f1`
|
||||
--> $DIR/anonymous-higher-ranked-lifetime.rs:16:25
|
||||
|
@ -22,7 +22,7 @@ LL | f2(|_: (), _: ()| {});
|
|||
| |
|
||||
| expected due to this
|
||||
|
|
||||
= note: expected closure signature `for<'a, 'r> fn(&'a (), &'r ()) -> _`
|
||||
= note: expected closure signature `for<'a, 'b> fn(&'a (), &'b ()) -> _`
|
||||
found closure signature `fn((), ()) -> _`
|
||||
note: required by a bound in `f2`
|
||||
--> $DIR/anonymous-higher-ranked-lifetime.rs:17:25
|
||||
|
@ -38,7 +38,7 @@ LL | f3(|_: (), _: ()| {});
|
|||
| |
|
||||
| expected due to this
|
||||
|
|
||||
= note: expected closure signature `for<'r> fn(&(), &'r ()) -> _`
|
||||
= note: expected closure signature `for<'a> fn(&(), &'a ()) -> _`
|
||||
found closure signature `fn((), ()) -> _`
|
||||
note: required by a bound in `f3`
|
||||
--> $DIR/anonymous-higher-ranked-lifetime.rs:18:29
|
||||
|
@ -54,7 +54,7 @@ LL | f4(|_: (), _: ()| {});
|
|||
| |
|
||||
| expected due to this
|
||||
|
|
||||
= note: expected closure signature `for<'r, 's> fn(&'s (), &'r ()) -> _`
|
||||
= note: expected closure signature `for<'r, 'a> fn(&'a (), &'r ()) -> _`
|
||||
found closure signature `fn((), ()) -> _`
|
||||
note: required by a bound in `f4`
|
||||
--> $DIR/anonymous-higher-ranked-lifetime.rs:19:25
|
||||
|
@ -86,7 +86,7 @@ LL | g1(|_: (), _: ()| {});
|
|||
| |
|
||||
| expected due to this
|
||||
|
|
||||
= note: expected closure signature `for<'r> fn(&'r (), Box<(dyn for<'r> Fn(&'r ()) + 'static)>) -> _`
|
||||
= note: expected closure signature `for<'a> fn(&'a (), Box<(dyn for<'a> Fn(&'a ()) + 'static)>) -> _`
|
||||
found closure signature `fn((), ()) -> _`
|
||||
note: required by a bound in `g1`
|
||||
--> $DIR/anonymous-higher-ranked-lifetime.rs:23:25
|
||||
|
@ -102,7 +102,7 @@ LL | g2(|_: (), _: ()| {});
|
|||
| |
|
||||
| expected due to this
|
||||
|
|
||||
= note: expected closure signature `for<'r> fn(&'r (), for<'r> fn(&'r ())) -> _`
|
||||
= note: expected closure signature `for<'a> fn(&'a (), for<'a> fn(&'a ())) -> _`
|
||||
found closure signature `fn((), ()) -> _`
|
||||
note: required by a bound in `g2`
|
||||
--> $DIR/anonymous-higher-ranked-lifetime.rs:24:25
|
||||
|
@ -118,7 +118,7 @@ LL | g3(|_: (), _: ()| {});
|
|||
| |
|
||||
| expected due to this
|
||||
|
|
||||
= note: expected closure signature `for<'s> fn(&'s (), Box<(dyn for<'r> Fn(&'r ()) + 'static)>) -> _`
|
||||
= note: expected closure signature `for<'s> fn(&'s (), Box<(dyn for<'a> Fn(&'a ()) + 'static)>) -> _`
|
||||
found closure signature `fn((), ()) -> _`
|
||||
note: required by a bound in `g3`
|
||||
--> $DIR/anonymous-higher-ranked-lifetime.rs:25:25
|
||||
|
@ -134,7 +134,7 @@ LL | g4(|_: (), _: ()| {});
|
|||
| |
|
||||
| expected due to this
|
||||
|
|
||||
= note: expected closure signature `for<'s> fn(&'s (), for<'r> fn(&'r ())) -> _`
|
||||
= note: expected closure signature `for<'a> fn(&'a (), for<'r> fn(&'r ())) -> _`
|
||||
found closure signature `fn((), ()) -> _`
|
||||
note: required by a bound in `g4`
|
||||
--> $DIR/anonymous-higher-ranked-lifetime.rs:26:25
|
||||
|
@ -150,7 +150,7 @@ LL | h1(|_: (), _: (), _: (), _: ()| {});
|
|||
| |
|
||||
| expected due to this
|
||||
|
|
||||
= note: expected closure signature `for<'r, 's> fn(&'r (), Box<(dyn for<'r> Fn(&'r ()) + 'static)>, &'s (), for<'r, 's> fn(&'r (), &'s ())) -> _`
|
||||
= note: expected closure signature `for<'a, 'b> fn(&'a (), Box<(dyn for<'a> Fn(&'a ()) + 'static)>, &'b (), for<'a, 'b> fn(&'a (), &'b ())) -> _`
|
||||
found closure signature `fn((), (), (), ()) -> _`
|
||||
note: required by a bound in `h1`
|
||||
--> $DIR/anonymous-higher-ranked-lifetime.rs:29:25
|
||||
|
@ -166,7 +166,7 @@ LL | h2(|_: (), _: (), _: (), _: ()| {});
|
|||
| |
|
||||
| expected due to this
|
||||
|
|
||||
= note: expected closure signature `for<'t0, 'r> fn(&'r (), Box<(dyn for<'r> Fn(&'r ()) + 'static)>, &'t0 (), for<'r, 's> fn(&'r (), &'s ())) -> _`
|
||||
= note: expected closure signature `for<'t0, 'a> fn(&'a (), Box<(dyn for<'a> Fn(&'a ()) + 'static)>, &'t0 (), for<'a, 'b> fn(&'a (), &'b ())) -> _`
|
||||
found closure signature `fn((), (), (), ()) -> _`
|
||||
note: required by a bound in `h2`
|
||||
--> $DIR/anonymous-higher-ranked-lifetime.rs:30:25
|
||||
|
|
|
@ -18,7 +18,7 @@ LL | async fn baz<T>(_c: impl FnMut() -> T) where T: Future<Output=()> {
|
|||
| ___________________________________________________________________^
|
||||
LL | | }
|
||||
| |_^
|
||||
= note: required because it captures the following types: `ResumeTy`, `impl for<'r, 's, 't> Future<Output = ()>`, `()`
|
||||
= note: required because it captures the following types: `ResumeTy`, `impl for<'a, 'b, 'c> Future<Output = ()>`, `()`
|
||||
note: required because it's used within this `async` block
|
||||
--> $DIR/issue-70935-complex-spans.rs:16:16
|
||||
|
|
||||
|
|
|
@ -7,5 +7,5 @@ fn main() {
|
|||
// we shouldn't ice with the bound var here.
|
||||
assert_eq!(foo, y);
|
||||
//~^ ERROR binary operation `==` cannot be applied to type
|
||||
//~| ERROR `for<'r> fn(&'r i32) -> &'r i32 {foo}` doesn't implement `Debug`
|
||||
//~| ERROR `for<'a> fn(&'a i32) -> &'a i32 {foo}` doesn't implement `Debug`
|
||||
}
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
error[E0369]: binary operation `==` cannot be applied to type `for<'r> fn(&'r i32) -> &'r i32 {foo}`
|
||||
error[E0369]: binary operation `==` cannot be applied to type `for<'a> fn(&'a i32) -> &'a i32 {foo}`
|
||||
--> $DIR/issue-77910-1.rs:8:5
|
||||
|
|
||||
LL | assert_eq!(foo, y);
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| for<'r> fn(&'r i32) -> &'r i32 {foo}
|
||||
| for<'a> fn(&'a i32) -> &'a i32 {foo}
|
||||
| _
|
||||
|
|
||||
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0277]: `for<'r> fn(&'r i32) -> &'r i32 {foo}` doesn't implement `Debug`
|
||||
error[E0277]: `for<'a> fn(&'a i32) -> &'a i32 {foo}` doesn't implement `Debug`
|
||||
--> $DIR/issue-77910-1.rs:8:5
|
||||
|
|
||||
LL | fn foo(s: &i32) -> &i32 {
|
||||
| --- consider calling this function
|
||||
...
|
||||
LL | assert_eq!(foo, y);
|
||||
| ^^^^^^^^^^^^^^^^^^ `for<'r> fn(&'r i32) -> &'r i32 {foo}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
||||
| ^^^^^^^^^^^^^^^^^^ `for<'a> fn(&'a i32) -> &'a i32 {foo}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
||||
|
|
||||
= help: the trait `Debug` is not implemented for fn item `for<'r> fn(&'r i32) -> &'r i32 {foo}`
|
||||
= help: the trait `Debug` is not implemented for fn item `for<'a> fn(&'a i32) -> &'a i32 {foo}`
|
||||
= help: use parentheses to call the function: `foo(s)`
|
||||
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
error[E0369]: binary operation `==` cannot be applied to type `for<'r> fn(&'r i32) -> &'r i32 {foo}`
|
||||
error[E0369]: binary operation `==` cannot be applied to type `for<'a> fn(&'a i32) -> &'a i32 {foo}`
|
||||
--> $DIR/issue-77910-2.rs:7:12
|
||||
|
|
||||
LL | if foo == y {}
|
||||
| --- ^^ - _
|
||||
| |
|
||||
| for<'r> fn(&'r i32) -> &'r i32 {foo}
|
||||
| for<'a> fn(&'a i32) -> &'a i32 {foo}
|
||||
|
|
||||
help: use parentheses to call this function
|
||||
|
|
||||
|
|
|
@ -26,7 +26,7 @@ LL | with_closure_expecting_fn_with_free_region(|x: fn(&u32), y| {});
|
|||
| ^ one type is more general than the other
|
||||
|
|
||||
= note: expected fn pointer `fn(&u32)`
|
||||
found fn pointer `for<'r> fn(&'r u32)`
|
||||
found fn pointer `for<'a> fn(&'a u32)`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/expect-fn-supply-fn.rs:39:50
|
||||
|
@ -34,7 +34,7 @@ error[E0308]: mismatched types
|
|||
LL | with_closure_expecting_fn_with_bound_region(|x: fn(&'x u32), y| {});
|
||||
| ^ one type is more general than the other
|
||||
|
|
||||
= note: expected fn pointer `for<'r> fn(&'r u32)`
|
||||
= note: expected fn pointer `for<'a> fn(&'a u32)`
|
||||
found fn pointer `fn(&u32)`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
|
@ -43,7 +43,7 @@ error[E0308]: mismatched types
|
|||
LL | with_closure_expecting_fn_with_bound_region(|x: Foo<'_>, y| {
|
||||
| ^ one type is more general than the other
|
||||
|
|
||||
= note: expected fn pointer `for<'r> fn(&'r u32)`
|
||||
= note: expected fn pointer `for<'a> fn(&'a u32)`
|
||||
found fn pointer `fn(&u32)`
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
|
|
@ -8,7 +8,7 @@ LL | call_bare(f)
|
|||
| |
|
||||
| arguments to this function are incorrect
|
||||
|
|
||||
= note: expected fn pointer `for<'r> fn(&'r str)`
|
||||
= note: expected fn pointer `for<'a> fn(&'a str)`
|
||||
found closure `[closure@$DIR/closure-reform-bad.rs:10:13: 10:22]`
|
||||
note: closures can only be coerced to `fn` types if they do not capture any variables
|
||||
--> $DIR/closure-reform-bad.rs:10:43
|
||||
|
|
|
@ -5,10 +5,10 @@ LL | fn from(_: fn((), (), &mut ())) -> Self {
|
|||
| ^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| types differ in mutability
|
||||
| help: change the parameter type to match the trait: `for<'r> fn((), (), &'r ())`
|
||||
| help: change the parameter type to match the trait: `for<'a> fn((), (), &'a ())`
|
||||
|
|
||||
= note: expected fn pointer `fn(for<'r> fn((), (), &'r ())) -> A`
|
||||
found fn pointer `fn(for<'r> fn((), (), &'r mut ())) -> A`
|
||||
= note: expected fn pointer `fn(for<'a> fn((), (), &'a ())) -> A`
|
||||
found fn pointer `fn(for<'a> fn((), (), &'a mut ())) -> A`
|
||||
|
||||
error[E0053]: method `from` has an incompatible type for trait
|
||||
--> $DIR/issue-90444.rs:11:16
|
||||
|
|
|
@ -9,8 +9,8 @@ LL | do_something(SomeImplementation(), test);
|
|||
LL | fn test<'a, I: Iterable>(_: &mut I::Iterator<'a>) {}
|
||||
| ------------------------------------------------- found signature defined here
|
||||
|
|
||||
= note: expected function signature `for<'r> fn(&'r mut std::iter::Empty<usize>) -> _`
|
||||
found function signature `for<'a, 'r> fn(&'r mut <_ as Iterable>::Iterator<'a>) -> _`
|
||||
= note: expected function signature `for<'a> fn(&'a mut std::iter::Empty<usize>) -> _`
|
||||
found function signature `for<'a, 'b> fn(&'b mut <_ as Iterable>::Iterator<'a>) -> _`
|
||||
note: required by a bound in `do_something`
|
||||
--> $DIR/issue-88382.rs:20:48
|
||||
|
|
||||
|
|
|
@ -19,7 +19,7 @@ note: the following trait bounds were not satisfied:
|
|||
LL | impl<T> StreamExt for T where for<'a> &'a mut T: Stream {}
|
||||
| --------- - ^^^^^^ unsatisfied trait bound introduced here
|
||||
|
||||
error[E0599]: the method `countx` exists for struct `Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:129:30: 129:37]>`, but its trait bounds were not satisfied
|
||||
error[E0599]: the method `countx` exists for struct `Filter<Map<Repeat, for<'a> fn(&'a u64) -> &'a u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:129:30: 129:37]>`, but its trait bounds were not satisfied
|
||||
--> $DIR/issue-30786.rs:130:24
|
||||
|
|
||||
LL | pub struct Filter<S, F> {
|
||||
|
@ -29,12 +29,12 @@ LL | pub struct Filter<S, F> {
|
|||
| doesn't satisfy `_: StreamExt`
|
||||
...
|
||||
LL | let count = filter.countx();
|
||||
| ^^^^^^ method cannot be called on `Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:129:30: 129:37]>` due to unsatisfied trait bounds
|
||||
| ^^^^^^ method cannot be called on `Filter<Map<Repeat, for<'a> fn(&'a u64) -> &'a u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:129:30: 129:37]>` due to unsatisfied trait bounds
|
||||
|
|
||||
note: the following trait bounds were not satisfied:
|
||||
`&'a mut &Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:129:30: 129:37]>: Stream`
|
||||
`&'a mut &mut Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:129:30: 129:37]>: Stream`
|
||||
`&'a mut Filter<Map<Repeat, for<'r> fn(&'r u64) -> &'r u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:129:30: 129:37]>: Stream`
|
||||
`&'a mut &Filter<Map<Repeat, for<'a> fn(&'a u64) -> &'a u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:129:30: 129:37]>: Stream`
|
||||
`&'a mut &mut Filter<Map<Repeat, for<'a> fn(&'a u64) -> &'a u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:129:30: 129:37]>: Stream`
|
||||
`&'a mut Filter<Map<Repeat, for<'a> fn(&'a u64) -> &'a u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:129:30: 129:37]>: Stream`
|
||||
--> $DIR/issue-30786.rs:96:50
|
||||
|
|
||||
LL | impl<T> StreamExt for T where for<'a> &'a mut T: Stream {}
|
||||
|
|
|
@ -4,7 +4,7 @@ error: implementation of `Foo` is not general enough
|
|||
LL | assert_foo::<fn(&i32)>();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||
|
|
||||
= note: `Foo` would have to be implemented for the type `for<'r> fn(&'r i32)`
|
||||
= note: `Foo` would have to be implemented for the type `for<'a> fn(&'a i32)`
|
||||
= note: ...but `Foo` is actually implemented for the type `fn(&'0 i32)`, for some specific lifetime `'0`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | foo(bar, "string", |s| s.len() == 5);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
|
||||
|
|
||||
= note: expected trait `for<'r, 's> FnOnce<(&'r &'s str,)>`
|
||||
found trait `for<'r> FnOnce<(&'r &str,)>`
|
||||
= note: expected trait `for<'a, 'b> FnOnce<(&'a &'b str,)>`
|
||||
found trait `for<'a> FnOnce<(&'a &str,)>`
|
||||
note: this closure does not fulfill the lifetime requirements
|
||||
--> $DIR/issue-71955.rs:45:24
|
||||
|
|
||||
|
@ -23,8 +23,8 @@ error[E0308]: mismatched types
|
|||
LL | foo(bar, "string", |s| s.len() == 5);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
|
||||
|
|
||||
= note: expected trait `for<'r, 's> FnOnce<(&'r &'s str,)>`
|
||||
found trait `for<'r> FnOnce<(&'r &str,)>`
|
||||
= note: expected trait `for<'a, 'b> FnOnce<(&'a &'b str,)>`
|
||||
found trait `for<'a> FnOnce<(&'a &str,)>`
|
||||
note: this closure does not fulfill the lifetime requirements
|
||||
--> $DIR/issue-71955.rs:45:24
|
||||
|
|
||||
|
@ -42,8 +42,8 @@ error[E0308]: mismatched types
|
|||
LL | foo(baz, "string", |s| s.0.len() == 5);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
|
||||
|
|
||||
= note: expected trait `for<'r, 's> FnOnce<(&'r Wrapper<'s>,)>`
|
||||
found trait `for<'r> FnOnce<(&'r Wrapper<'_>,)>`
|
||||
= note: expected trait `for<'a, 'b> FnOnce<(&'a Wrapper<'b>,)>`
|
||||
found trait `for<'a> FnOnce<(&'a Wrapper<'_>,)>`
|
||||
note: this closure does not fulfill the lifetime requirements
|
||||
--> $DIR/issue-71955.rs:48:24
|
||||
|
|
||||
|
@ -61,8 +61,8 @@ error[E0308]: mismatched types
|
|||
LL | foo(baz, "string", |s| s.0.len() == 5);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
|
||||
|
|
||||
= note: expected trait `for<'r, 's> FnOnce<(&'r Wrapper<'s>,)>`
|
||||
found trait `for<'r> FnOnce<(&'r Wrapper<'_>,)>`
|
||||
= note: expected trait `for<'a, 'b> FnOnce<(&'a Wrapper<'b>,)>`
|
||||
found trait `for<'a> FnOnce<(&'a Wrapper<'_>,)>`
|
||||
note: this closure does not fulfill the lifetime requirements
|
||||
--> $DIR/issue-71955.rs:48:24
|
||||
|
|
||||
|
|
|
@ -6,7 +6,7 @@ trait SomeTrait<'a> {
|
|||
|
||||
fn give_me_ice<T>() {
|
||||
callee::<fn(&()) -> <T as SomeTrait<'_>>::Associated>();
|
||||
//~^ ERROR the trait bound `for<'r> T: SomeTrait<'r>` is not satisfied [E0277]
|
||||
//~^ ERROR the trait bound `for<'a> T: SomeTrait<'a>` is not satisfied [E0277]
|
||||
}
|
||||
|
||||
fn callee<T: Fn<(&'static (),)>>() {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
error[E0277]: the trait bound `for<'r> T: SomeTrait<'r>` is not satisfied
|
||||
error[E0277]: the trait bound `for<'a> T: SomeTrait<'a>` is not satisfied
|
||||
--> $DIR/issue-85455.rs:8:5
|
||||
|
|
||||
LL | callee::<fn(&()) -> <T as SomeTrait<'_>>::Associated>();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'r> SomeTrait<'r>` is not implemented for `T`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> SomeTrait<'a>` is not implemented for `T`
|
||||
|
|
||||
help: consider restricting type parameter `T`
|
||||
|
|
||||
LL | fn give_me_ice<T: for<'r> SomeTrait<'r>>() {
|
||||
LL | fn give_me_ice<T: for<'a> SomeTrait<'a>>() {
|
||||
| +++++++++++++++++++++++
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
@ -9,7 +9,7 @@ mod foo {
|
|||
}
|
||||
|
||||
pub macro m() {
|
||||
let _: () = S.f(); //~ ERROR type `for<'r> fn(&'r foo::S) {foo::S::f}` is private
|
||||
let _: () = S.f(); //~ ERROR type `for<'a> fn(&'a foo::S) {foo::S::f}` is private
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
error: type `for<'r> fn(&'r foo::S) {foo::S::f}` is private
|
||||
error: type `for<'a> fn(&'a foo::S) {foo::S::f}` is private
|
||||
--> $DIR/impl_items.rs:12:23
|
||||
|
|
||||
LL | let _: () = S.f();
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
error[E0277]: the trait bound `(): AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not satisfied
|
||||
error[E0277]: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied
|
||||
--> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:13
|
||||
|
|
||||
LL | fn ice() -> impl AsRef<Fn(&())> {
|
||||
| ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not implemented for `()`
|
||||
| ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -9,11 +9,11 @@ help: add `dyn` keyword before this trait
|
|||
LL | fn ice() -> impl AsRef<dyn Fn(&())> {
|
||||
| +++
|
||||
|
||||
error[E0277]: the trait bound `(): AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not satisfied
|
||||
error[E0277]: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied
|
||||
--> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:13
|
||||
|
|
||||
LL | fn ice() -> impl AsRef<Fn(&())> {
|
||||
| ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not implemented for `()`
|
||||
| ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#![allow(warnings)]
|
||||
|
||||
fn ice() -> impl AsRef<Fn(&())> {
|
||||
//~^ ERROR: the trait bound `(): AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not satisfied [E0277]
|
||||
//~^ ERROR: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied [E0277]
|
||||
//[edition2021]~| ERROR: trait objects must include the `dyn` keyword [E0782]
|
||||
todo!()
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
error[E0277]: the size for values of type `dyn for<'r> Fn(&'r isize) -> isize` cannot be known at compilation time
|
||||
error[E0277]: the size for values of type `dyn for<'a> Fn(&'a isize) -> isize` cannot be known at compilation time
|
||||
--> $DIR/issue-18919.rs:3:15
|
||||
|
|
||||
LL | fn ho_func(f: Option<FuncType>) {
|
||||
| ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
||||
|
|
||||
= help: the trait `Sized` is not implemented for `dyn for<'r> Fn(&'r isize) -> isize`
|
||||
= help: the trait `Sized` is not implemented for `dyn for<'a> Fn(&'a isize) -> isize`
|
||||
note: required by a bound in `Option`
|
||||
--> $DIR/issue-18919.rs:7:13
|
||||
|
|
||||
|
|
|
@ -6,8 +6,8 @@ LL | let x: &fn(&B) -> u32 = &B::func;
|
|||
| |
|
||||
| expected due to this
|
||||
|
|
||||
= note: expected reference `&for<'r> fn(&'r B) -> u32`
|
||||
found reference `&for<'r> fn(&'r B) -> u32 {B::func}`
|
||||
= note: expected reference `&for<'a> fn(&'a B) -> u32`
|
||||
found reference `&for<'a> fn(&'a B) -> u32 {B::func}`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ error[E0308]: mismatched types
|
|||
LL | foo(bar);
|
||||
| ^^^ one type is more general than the other
|
||||
|
|
||||
= note: expected trait object `dyn for<'r> Fn(&'r i32)`
|
||||
= note: expected trait object `dyn for<'a> Fn(&'a i32)`
|
||||
found trait object `dyn Fn(&i32)`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
|
@ -13,7 +13,7 @@ error[E0308]: mismatched types
|
|||
LL | foo(bar);
|
||||
| ^^^ one type is more general than the other
|
||||
|
|
||||
= note: expected trait object `dyn for<'r> Fn(&'r i32)`
|
||||
= note: expected trait object `dyn for<'a> Fn(&'a i32)`
|
||||
found trait object `dyn Fn(&i32)`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
error[E0599]: the function or associated item `make_g` exists for fn pointer `for<'r> fn(&'r ())`, but its trait bounds were not satisfied
|
||||
error[E0599]: the function or associated item `make_g` exists for fn pointer `for<'a> fn(&'a ())`, but its trait bounds were not satisfied
|
||||
--> $DIR/issue-57362-2.rs:22:25
|
||||
|
|
||||
LL | let x = <fn (&())>::make_g();
|
||||
| ^^^^^^ function or associated item cannot be called on `for<'r> fn(&'r ())` due to unsatisfied trait bounds
|
||||
| ^^^^^^ function or associated item cannot be called on `for<'a> fn(&'a ())` due to unsatisfied trait bounds
|
||||
|
|
||||
= note: the following trait bounds were not satisfied:
|
||||
`for<'r> fn(&'r ()): X`
|
||||
`for<'a> fn(&'a ()): X`
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
note: `X` defines an item `make_g`, perhaps you need to implement it
|
||||
--> $DIR/issue-57362-2.rs:8:1
|
||||
|
|
|
@ -31,7 +31,7 @@ error[E0308]: mismatched types
|
|||
LL | take_foo(|a| a);
|
||||
| ^^^^^^^^^^^^^^^ one type is more general than the other
|
||||
|
|
||||
= note: expected trait `for<'r> Fn<(&'r i32,)>`
|
||||
= note: expected trait `for<'a> Fn<(&'a i32,)>`
|
||||
found trait `Fn<(&i32,)>`
|
||||
note: this closure does not fulfill the lifetime requirements
|
||||
--> $DIR/issue-79187-2.rs:8:14
|
||||
|
|
|
@ -4,7 +4,7 @@ error[E0308]: mismatched types
|
|||
LL | thing(f);
|
||||
| ^^^^^^^^ one type is more general than the other
|
||||
|
|
||||
= note: expected trait `for<'r> FnOnce<(&'r u32,)>`
|
||||
= note: expected trait `for<'a> FnOnce<(&'a u32,)>`
|
||||
found trait `FnOnce<(&u32,)>`
|
||||
note: this closure does not fulfill the lifetime requirements
|
||||
--> $DIR/issue-79187.rs:4:13
|
||||
|
|
|
@ -15,7 +15,7 @@ error[E0308]: mismatched types
|
|||
LL | f(data, identity)
|
||||
| ^^^^^^^^^^^^^^^^^ one type is more general than the other
|
||||
|
|
||||
= note: expected trait `for<'r> Fn<(&'r T,)>`
|
||||
= note: expected trait `for<'a> Fn<(&'a T,)>`
|
||||
found trait `Fn<(&T,)>`
|
||||
note: the lifetime requirement is introduced here
|
||||
--> $DIR/issue_74400.rs:8:34
|
||||
|
|
|
@ -4,7 +4,7 @@ error: higher-ranked lifetime error
|
|||
LL | foo(&10);
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= note: could not prove `for<'b, 'r> &'b (): 'r`
|
||||
= note: could not prove `for<'b, 'a> &'b (): 'a`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ LL | a.iter().map(|_: &(u16, u16)| 45);
|
|||
| expected due to this
|
||||
|
|
||||
= note: expected closure signature `fn(&(u32, u32)) -> _`
|
||||
found closure signature `for<'r> fn(&'r (u16, u16)) -> _`
|
||||
found closure signature `for<'a> fn(&'a (u16, u16)) -> _`
|
||||
note: required by a bound in `map`
|
||||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
||||
|
|
||||
|
|
|
@ -13,7 +13,7 @@ error[E0308]: mismatched types
|
|||
LL | baz(|_| ());
|
||||
| ^^^^^^^^^^^ one type is more general than the other
|
||||
|
|
||||
= note: expected trait `for<'r> Fn<(&'r (),)>`
|
||||
= note: expected trait `for<'a> Fn<(&'a (),)>`
|
||||
found trait `Fn<(&(),)>`
|
||||
note: this closure does not fulfill the lifetime requirements
|
||||
--> $DIR/closure-mismatch.rs:8:9
|
||||
|
|
|
@ -10,7 +10,7 @@ LL | apply(&3, takes_mut);
|
|||
| required by a bound introduced by this call
|
||||
|
|
||||
= note: expected function signature `fn(&{integer}) -> _`
|
||||
found function signature `for<'r> fn(&'r mut isize) -> _`
|
||||
found function signature `for<'a> fn(&'a mut isize) -> _`
|
||||
note: required by a bound in `apply`
|
||||
--> $DIR/fn-variance-1.rs:5:37
|
||||
|
|
||||
|
@ -29,7 +29,7 @@ LL | apply(&mut 3, takes_imm);
|
|||
| required by a bound introduced by this call
|
||||
|
|
||||
= note: expected function signature `fn(&mut {integer}) -> _`
|
||||
found function signature `for<'r> fn(&'r isize) -> _`
|
||||
found function signature `for<'a> fn(&'a isize) -> _`
|
||||
note: required by a bound in `apply`
|
||||
--> $DIR/fn-variance-1.rs:5:37
|
||||
|
|
||||
|
|
|
@ -6,8 +6,8 @@ LL | once::<&str>("str").fuse().filter(|a: &str| true).count();
|
|||
| |
|
||||
| expected due to this
|
||||
|
|
||||
= note: expected closure signature `for<'r> fn(&'r &str) -> _`
|
||||
found closure signature `for<'r> fn(&'r str) -> _`
|
||||
= note: expected closure signature `for<'a> fn(&'a &str) -> _`
|
||||
found closure signature `for<'a> fn(&'a str) -> _`
|
||||
note: required by a bound in `filter`
|
||||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
||||
|
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | let mut closure = expect_sig(|p, y| *p = y);
|
|||
|
|
||||
= note: defining type: test::{closure#0} with closure substs [
|
||||
i16,
|
||||
for<'r, 's, 't> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) mut &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) i32, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t) }) i32)),
|
||||
for<'a, 'b, 'c> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) mut &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) i32, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('c) }) i32)),
|
||||
(),
|
||||
]
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | let mut closure = expect_sig(|p, y| *p = y);
|
|||
|
|
||||
= note: defining type: test::{closure#0} with closure substs [
|
||||
i16,
|
||||
for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) mut &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) i32, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) i32)),
|
||||
for<'a, 'b> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) mut &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) i32, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) i32)),
|
||||
(),
|
||||
]
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | |_outlives1, _outlives2, _outlives3, x, y| {
|
|||
|
|
||||
= note: defining type: supply::{closure#0} with closure substs [
|
||||
i16,
|
||||
for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) u32>, std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) &'_#3r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) u32>)),
|
||||
for<'a, 'b> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) u32>, std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) &'_#3r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) u32>)),
|
||||
(),
|
||||
]
|
||||
= note: late-bound region is '_#4r
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y
|
|||
|
|
||||
= note: defining type: supply::{closure#0} with closure substs [
|
||||
i16,
|
||||
for<'r, 's, 't, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('t0) }) &'_#2r u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrNamed('t1) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrNamed('t2) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('t0) }) u32>)),
|
||||
for<'a, 'b, 'c, 'd, 'e, 'f> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('c) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('d) }) &'_#2r u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrNamed('e) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrNamed('f) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('d) }) u32>)),
|
||||
(),
|
||||
]
|
||||
= note: late-bound region is '_#3r
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | foo(cell, |cell_a, cell_x| {
|
|||
|
|
||||
= note: defining type: case1::{closure#0} with closure substs [
|
||||
i32,
|
||||
for<'r> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) u32>)),
|
||||
for<'a> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) u32>)),
|
||||
(),
|
||||
]
|
||||
|
||||
|
@ -36,7 +36,7 @@ LL | foo(cell, |cell_a, cell_x| {
|
|||
|
|
||||
= note: defining type: case2::{closure#0} with closure substs [
|
||||
i32,
|
||||
for<'r> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) u32>)),
|
||||
for<'a> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) u32>)),
|
||||
(),
|
||||
]
|
||||
= note: number of external vids: 2
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
|
|||
|
|
||||
= note: defining type: supply::{closure#0} with closure substs [
|
||||
i16,
|
||||
for<'r, 's, 't, 't0, 't1> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('t0) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrNamed('t1) }) u32>)),
|
||||
for<'a, 'b, 'c, 'd, 'e> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('c) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('d) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrNamed('e) }) u32>)),
|
||||
(),
|
||||
]
|
||||
= note: late-bound region is '_#2r
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y
|
|||
|
|
||||
= note: defining type: supply::{closure#0} with closure substs [
|
||||
i16,
|
||||
for<'r, 's, 't, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t) }) std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('t0) }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrNamed('t1) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrNamed('t2) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('t0) }) u32>)),
|
||||
for<'a, 'b, 'c, 'd, 'e, 'f> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('c) }) std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('d) }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrNamed('e) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrNamed('f) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('d) }) u32>)),
|
||||
(),
|
||||
]
|
||||
= note: late-bound region is '_#3r
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {
|
|||
|
|
||||
= note: defining type: test::{closure#0} with closure substs [
|
||||
i16,
|
||||
for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) u32>)),
|
||||
for<'a, 'b> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) u32>)),
|
||||
(),
|
||||
]
|
||||
= note: late-bound region is '_#3r
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | |_outlives1, _outlives2, x, y| {
|
|||
|
|
||||
= note: defining type: supply::{closure#0} with closure substs [
|
||||
i16,
|
||||
for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) u32>)),
|
||||
for<'a, 'b> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) u32>)),
|
||||
(),
|
||||
]
|
||||
= note: late-bound region is '_#3r
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
|
|||
|
|
||||
= note: defining type: supply::{closure#0} with closure substs [
|
||||
i16,
|
||||
for<'r, 's, 't, 't0, 't1> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('t0) }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrNamed('t1) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) u32>)),
|
||||
for<'a, 'b, 'c, 'd, 'e> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('c) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('d) }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrNamed('e) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) u32>)),
|
||||
(),
|
||||
]
|
||||
= note: late-bound region is '_#2r
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y
|
|||
|
|
||||
= note: defining type: supply::{closure#0} with closure substs [
|
||||
i16,
|
||||
for<'r, 's, 't, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('t0) }) &'_#2r u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrNamed('t1) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrNamed('t2) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('t0) }) u32>)),
|
||||
for<'a, 'b, 'c, 'd, 'e, 'f> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('c) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('d) }) &'_#2r u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrNamed('e) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrNamed('f) }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('d) }) u32>)),
|
||||
(),
|
||||
]
|
||||
= note: late-bound region is '_#3r
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | expect_sig(|a, b| b); // ought to return `a`
|
|||
|
|
||||
= note: defining type: test::{closure#0} with closure substs [
|
||||
i16,
|
||||
for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) i32, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) i32)) -> &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) i32,
|
||||
for<'a, 'b> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) i32, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) i32)) -> &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) i32,
|
||||
(),
|
||||
]
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
error[E0599]: the function or associated item `make_g` exists for fn pointer `for<'r> fn(&'r ())`, but its trait bounds were not satisfied
|
||||
error[E0599]: the function or associated item `make_g` exists for fn pointer `for<'a> fn(&'a ())`, but its trait bounds were not satisfied
|
||||
--> $DIR/issue-57642-higher-ranked-subtype.rs:31:25
|
||||
|
|
||||
LL | let x = <fn (&())>::make_g();
|
||||
| ^^^^^^ function or associated item cannot be called on `for<'r> fn(&'r ())` due to unsatisfied trait bounds
|
||||
| ^^^^^^ function or associated item cannot be called on `for<'a> fn(&'a ())` due to unsatisfied trait bounds
|
||||
|
|
||||
= note: the following trait bounds were not satisfied:
|
||||
`for<'r> fn(&'r ()): X`
|
||||
`for<'a> fn(&'a ()): X`
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
note: `X` defines an item `make_g`, perhaps you need to implement it
|
||||
--> $DIR/issue-57642-higher-ranked-subtype.rs:4:1
|
||||
|
@ -13,11 +13,11 @@ note: `X` defines an item `make_g`, perhaps you need to implement it
|
|||
LL | trait X {
|
||||
| ^^^^^^^
|
||||
|
||||
error[E0599]: no function or associated item named `make_f` found for fn pointer `for<'r> fn(&'r ())` in the current scope
|
||||
error[E0599]: no function or associated item named `make_f` found for fn pointer `for<'a> fn(&'a ())` in the current scope
|
||||
--> $DIR/issue-57642-higher-ranked-subtype.rs:35:25
|
||||
|
|
||||
LL | let x = <fn (&())>::make_f();
|
||||
| ^^^^^^ function or associated item not found in `for<'r> fn(&'r ())`
|
||||
| ^^^^^^ function or associated item not found in `for<'a> fn(&'a ())`
|
||||
|
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
note: `Y` defines an item `make_f`, perhaps you need to implement it
|
||||
|
|
|
@ -4,7 +4,7 @@ error: implementation of `Foo` is not general enough
|
|||
LL | <fn(&u8) as Foo>::ASSOC;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||
|
|
||||
= note: `Foo` would have to be implemented for the type `for<'r> fn(&'r u8)`
|
||||
= note: `Foo` would have to be implemented for the type `for<'a> fn(&'a u8)`
|
||||
= note: ...but `Foo` is actually implemented for the type `fn(&'0 u8)`, for some specific lifetime `'0`
|
||||
|
||||
error: implementation of `Foo` is not general enough
|
||||
|
@ -13,7 +13,7 @@ error: implementation of `Foo` is not general enough
|
|||
LL | <fn(&u8) as Foo>::ASSOC;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||
|
|
||||
= note: `Foo` would have to be implemented for the type `for<'r> fn(&'r u8)`
|
||||
= note: `Foo` would have to be implemented for the type `for<'a> fn(&'a u8)`
|
||||
= note: ...but `Foo` is actually implemented for the type `fn(&'0 u8)`, for some specific lifetime `'0`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
|
|
@ -4,7 +4,7 @@ error: implementation of `Y` is not general enough
|
|||
LL | let _x = <fn(&())>::make_f();
|
||||
| ^^^^^^^^^^^^^^^^^^^ implementation of `Y` is not general enough
|
||||
|
|
||||
= note: `Y` would have to be implemented for the type `for<'r> fn(&'r ())`
|
||||
= note: `Y` would have to be implemented for the type `for<'a> fn(&'a ())`
|
||||
= note: ...but `Y` is actually implemented for the type `fn(&'0 ())`, for some specific lifetime `'0`
|
||||
|
||||
error: implementation of `Y` is not general enough
|
||||
|
@ -13,7 +13,7 @@ error: implementation of `Y` is not general enough
|
|||
LL | let _x = <fn(&())>::make_f();
|
||||
| ^^^^^^^^^^^^^^^^^^^ implementation of `Y` is not general enough
|
||||
|
|
||||
= note: `Y` would have to be implemented for the type `for<'r> fn(&'r ())`
|
||||
= note: `Y` would have to be implemented for the type `for<'a> fn(&'a ())`
|
||||
= note: ...but `Y` is actually implemented for the type `fn(&'0 ())`, for some specific lifetime `'0`
|
||||
|
||||
error: implementation of `Y` is not general enough
|
||||
|
@ -22,7 +22,7 @@ error: implementation of `Y` is not general enough
|
|||
LL | let _x = <fn(&())>::make_f();
|
||||
| ^^^^^^^^^^^^^^^^^^^ implementation of `Y` is not general enough
|
||||
|
|
||||
= note: `Y` would have to be implemented for the type `for<'r> fn(&'r ())`
|
||||
= note: `Y` would have to be implemented for the type `for<'a> fn(&'a ())`
|
||||
= note: ...but `Y` is actually implemented for the type `fn(&'0 ())`, for some specific lifetime `'0`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
|
|
@ -4,7 +4,7 @@ error[E0308]: mismatched types
|
|||
LL | let b: fn(&u32) -> &u32 = a;
|
||||
| ^ one type is more general than the other
|
||||
|
|
||||
= note: expected fn pointer `for<'r> fn(&'r u32) -> &'r u32`
|
||||
= note: expected fn pointer `for<'a> fn(&'a u32) -> &'a u32`
|
||||
found fn pointer `fn(&u32) -> &u32`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
@ -6,7 +6,7 @@ LL | twice(cell, value, |a, b| invoke(a, b));
|
|||
|
|
||||
= note: defining type: generic::<T>::{closure#0} with closure substs [
|
||||
i16,
|
||||
for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) ()>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) T)),
|
||||
for<'a, 'b> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) ()>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) T)),
|
||||
(),
|
||||
]
|
||||
= note: number of external vids: 2
|
||||
|
@ -28,7 +28,7 @@ LL | twice(cell, value, |a, b| invoke(a, b));
|
|||
|
|
||||
= note: defining type: generic_fail::<T>::{closure#0} with closure substs [
|
||||
i16,
|
||||
for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) ()>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) T)),
|
||||
for<'a, 'b> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('a) }) ()>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('b) }) T)),
|
||||
(),
|
||||
]
|
||||
= note: late-bound region is '_#2r
|
||||
|
|
|
@ -11,11 +11,11 @@ mod priv_nominal {
|
|||
|
||||
pub macro mac() {
|
||||
let value = Pub::method;
|
||||
//~^ ERROR type `for<'r> fn(&'r priv_nominal::Pub) {priv_nominal::Pub::method}` is private
|
||||
//~^ ERROR type `for<'a> fn(&'a priv_nominal::Pub) {priv_nominal::Pub::method}` is private
|
||||
value;
|
||||
//~^ ERROR type `for<'r> fn(&'r priv_nominal::Pub) {priv_nominal::Pub::method}` is private
|
||||
//~^ ERROR type `for<'a> fn(&'a priv_nominal::Pub) {priv_nominal::Pub::method}` is private
|
||||
Pub.method();
|
||||
//~^ ERROR type `for<'r> fn(&'r priv_nominal::Pub) {priv_nominal::Pub::method}` is private
|
||||
//~^ ERROR type `for<'a> fn(&'a priv_nominal::Pub) {priv_nominal::Pub::method}` is private
|
||||
Pub::CONST;
|
||||
//~^ ERROR associated constant `CONST` is private
|
||||
// let _: Pub::AssocTy;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
error: type `for<'r> fn(&'r priv_nominal::Pub) {priv_nominal::Pub::method}` is private
|
||||
error: type `for<'a> fn(&'a priv_nominal::Pub) {priv_nominal::Pub::method}` is private
|
||||
--> $DIR/associated-item-privacy-inherent.rs:13:21
|
||||
|
|
||||
LL | let value = Pub::method;
|
||||
|
@ -9,7 +9,7 @@ LL | priv_nominal::mac!();
|
|||
|
|
||||
= note: this error originates in the macro `priv_nominal::mac` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: type `for<'r> fn(&'r priv_nominal::Pub) {priv_nominal::Pub::method}` is private
|
||||
error: type `for<'a> fn(&'a priv_nominal::Pub) {priv_nominal::Pub::method}` is private
|
||||
--> $DIR/associated-item-privacy-inherent.rs:15:9
|
||||
|
|
||||
LL | value;
|
||||
|
@ -20,7 +20,7 @@ LL | priv_nominal::mac!();
|
|||
|
|
||||
= note: this error originates in the macro `priv_nominal::mac` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: type `for<'r> fn(&'r priv_nominal::Pub) {priv_nominal::Pub::method}` is private
|
||||
error: type `for<'a> fn(&'a priv_nominal::Pub) {priv_nominal::Pub::method}` is private
|
||||
--> $DIR/associated-item-privacy-inherent.rs:17:13
|
||||
|
|
||||
LL | Pub.method();
|
||||
|
|
|
@ -13,11 +13,11 @@ mod priv_trait {
|
|||
|
||||
pub macro mac() {
|
||||
let value = <Pub as PrivTr>::method;
|
||||
//~^ ERROR type `for<'r> fn(&'r priv_trait::Pub) {<priv_trait::Pub as PrivTr>::method}` is private
|
||||
//~^ ERROR type `for<'a> fn(&'a priv_trait::Pub) {<priv_trait::Pub as PrivTr>::method}` is private
|
||||
value;
|
||||
//~^ ERROR type `for<'r> fn(&'r priv_trait::Pub) {<priv_trait::Pub as PrivTr>::method}` is private
|
||||
//~^ ERROR type `for<'a> fn(&'a priv_trait::Pub) {<priv_trait::Pub as PrivTr>::method}` is private
|
||||
Pub.method();
|
||||
//~^ ERROR type `for<'r> fn(&'r Self) {<Self as PrivTr>::method}` is private
|
||||
//~^ ERROR type `for<'a> fn(&'a Self) {<Self as PrivTr>::method}` is private
|
||||
<Pub as PrivTr>::CONST;
|
||||
//~^ ERROR associated constant `<Pub as PrivTr>::CONST` is private
|
||||
let _: <Pub as PrivTr>::AssocTy;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
error: type `for<'r> fn(&'r priv_trait::Pub) {<priv_trait::Pub as PrivTr>::method}` is private
|
||||
error: type `for<'a> fn(&'a priv_trait::Pub) {<priv_trait::Pub as PrivTr>::method}` is private
|
||||
--> $DIR/associated-item-privacy-trait.rs:15:21
|
||||
|
|
||||
LL | let value = <Pub as PrivTr>::method;
|
||||
|
@ -9,7 +9,7 @@ LL | priv_trait::mac!();
|
|||
|
|
||||
= note: this error originates in the macro `priv_trait::mac` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: type `for<'r> fn(&'r priv_trait::Pub) {<priv_trait::Pub as PrivTr>::method}` is private
|
||||
error: type `for<'a> fn(&'a priv_trait::Pub) {<priv_trait::Pub as PrivTr>::method}` is private
|
||||
--> $DIR/associated-item-privacy-trait.rs:17:9
|
||||
|
|
||||
LL | value;
|
||||
|
@ -20,7 +20,7 @@ LL | priv_trait::mac!();
|
|||
|
|
||||
= note: this error originates in the macro `priv_trait::mac` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: type `for<'r> fn(&'r Self) {<Self as PrivTr>::method}` is private
|
||||
error: type `for<'a> fn(&'a Self) {<Self as PrivTr>::method}` is private
|
||||
--> $DIR/associated-item-privacy-trait.rs:19:13
|
||||
|
|
||||
LL | Pub.method();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
// error-pattern:type `fn() {<u8 as ext::PrivTrait>::method}` is private
|
||||
// error-pattern:type `fn(u8) -> ext::PrivTupleStruct {ext::PrivTupleStruct}` is private
|
||||
// error-pattern:type `fn(u8) -> PubTupleStruct {PubTupleStruct}` is private
|
||||
// error-pattern:type `for<'r> fn(&'r Pub<u8>) {Pub::<u8>::priv_method}` is private
|
||||
// error-pattern:type `for<'a> fn(&'a Pub<u8>) {Pub::<u8>::priv_method}` is private
|
||||
|
||||
#![feature(decl_macro)]
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ LL | ext::m!();
|
|||
|
|
||||
= note: this error originates in the macro `ext::m` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: type `for<'r> fn(&'r Pub<u8>) {Pub::<u8>::priv_method}` is private
|
||||
error: type `for<'a> fn(&'a Pub<u8>) {Pub::<u8>::priv_method}` is private
|
||||
--> $DIR/private-inferred-type-3.rs:16:5
|
||||
|
|
||||
LL | ext::m!();
|
||||
|
|
|
@ -47,7 +47,7 @@ mod m {
|
|||
PubTupleStruct;
|
||||
//~^ ERROR type `fn(u8) -> PubTupleStruct {PubTupleStruct}` is private
|
||||
Pub(0u8).priv_method();
|
||||
//~^ ERROR type `for<'r> fn(&'r Pub<u8>) {Pub::<u8>::priv_method}` is private
|
||||
//~^ ERROR type `for<'a> fn(&'a Pub<u8>) {Pub::<u8>::priv_method}` is private
|
||||
}
|
||||
|
||||
trait Trait {}
|
||||
|
|
|
@ -161,7 +161,7 @@ LL | m::m!();
|
|||
|
|
||||
= note: this error originates in the macro `m::m` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: type `for<'r> fn(&'r Pub<u8>) {Pub::<u8>::priv_method}` is private
|
||||
error: type `for<'a> fn(&'a Pub<u8>) {Pub::<u8>::priv_method}` is private
|
||||
--> $DIR/private-inferred-type.rs:49:18
|
||||
|
|
||||
LL | Pub(0u8).priv_method();
|
||||
|
|
|
@ -7,7 +7,7 @@ LL | f
|
|||
| ^ one type is more general than the other
|
||||
|
|
||||
= note: expected fn pointer `for<'r> fn(Cell<(&'r i32, &'r i32)>)`
|
||||
found fn pointer `for<'s> fn(Cell<(&'r i32, &'s i32)>)`
|
||||
found fn pointer `for<'a> fn(Cell<(&'r i32, &'a i32)>)`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | let _: fn(&mut &isize, &mut &isize) = a;
|
||||
| ^ one type is more general than the other
|
||||
|
|
||||
= note: expected fn pointer `for<'r, 's, 't, 't0> fn(&'r mut &'s isize, &'t mut &'t0 isize)`
|
||||
found fn item `for<'r, 's> fn(&'r mut &isize, &'s mut &isize) {a::<'_, '_>}`
|
||||
= note: expected fn pointer `for<'a, 'b, 'c, 'd> fn(&'a mut &'b isize, &'c mut &'d isize)`
|
||||
found fn item `for<'a, 'b> fn(&'a mut &isize, &'b mut &isize) {a::<'_, '_>}`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | let _: fn(&mut &isize, &mut &isize, &mut &isize) = a;
|
||||
| ^ one type is more general than the other
|
||||
|
|
||||
= note: expected fn pointer `for<'r, 's, 't, 't0, 't1, 't2> fn(&'r mut &'s isize, &'t mut &'t0 isize, &'t1 mut &'t2 isize)`
|
||||
found fn item `for<'r, 's, 't> fn(&'r mut &isize, &'s mut &isize, &'t mut &isize) {a::<'_, '_, '_>}`
|
||||
= note: expected fn pointer `for<'a, 'b, 'c, 'd, 'e, 'f> fn(&'a mut &'b isize, &'c mut &'d isize, &'e mut &'f isize)`
|
||||
found fn item `for<'a, 'b, 'c> fn(&'a mut &isize, &'b mut &isize, &'c mut &isize) {a::<'_, '_, '_>}`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ LL | want_G(baz);
|
|||
| arguments to this function are incorrect
|
||||
|
|
||||
= note: expected fn pointer `for<'cx> fn(&'cx S) -> &'static S`
|
||||
found fn item `for<'r> fn(&'r S) -> &'r S {baz}`
|
||||
found fn item `for<'a> fn(&'a S) -> &'a S {baz}`
|
||||
note: function defined here
|
||||
--> $DIR/regions-fn-subtyping-return-static-fail.rs:20:4
|
||||
|
|
||||
|
|
|
@ -4,8 +4,8 @@ error[E0308]: mismatched types
|
|||
LL | let _: fn(&mut &isize, &mut &isize) = a;
|
||||
| ^ one type is more general than the other
|
||||
|
|
||||
= note: expected fn pointer `for<'r, 's, 't, 't0> fn(&'r mut &'s isize, &'t mut &'t0 isize)`
|
||||
found fn item `for<'r, 's> fn(&'r mut &isize, &'s mut &isize) {a::<'_, '_>}`
|
||||
= note: expected fn pointer `for<'a, 'b, 'c, 'd> fn(&'a mut &'b isize, &'c mut &'d isize)`
|
||||
found fn item `for<'a, 'b> fn(&'a mut &isize, &'b mut &isize) {a::<'_, '_>}`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ help: consider making the type lifetime-generic with a new `'a` lifetime
|
|||
LL | &(non_elidable as for<'a> fn(&'a u8, &'a u8) -> &'a u8);
|
||||
| +++++++ ++ ++ ++
|
||||
|
||||
error[E0605]: non-primitive cast: `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8 {non_elidable}` as `for<'r, 's> fn(&'r u8, &'s u8) -> &u8`
|
||||
error[E0605]: non-primitive cast: `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8 {non_elidable}` as `for<'a, 'b> fn(&'a u8, &'b u8) -> &u8`
|
||||
--> $DIR/rfc1623-2.rs:10:6
|
||||
|
|
||||
LL | &(non_elidable as fn(&u8, &u8) -> &u8);
|
||||
|
|
|
@ -220,7 +220,7 @@ error[E0308]: mismatched types
|
|||
--> $DIR/fn-or-tuple-struct-without-args.rs:41:20
|
||||
|
|
||||
LL | fn ban(&self) -> usize { 42 }
|
||||
| ---------------------- for<'r> fn(&'r X) -> usize {<X as T>::ban} defined here
|
||||
| ---------------------- for<'a> fn(&'a X) -> usize {<X as T>::ban} defined here
|
||||
...
|
||||
LL | let _: usize = X::ban;
|
||||
| ----- ^^^^^^ expected `usize`, found fn item
|
||||
|
@ -228,7 +228,7 @@ LL | let _: usize = X::ban;
|
|||
| expected due to this
|
||||
|
|
||||
= note: expected type `usize`
|
||||
found fn item `for<'r> fn(&'r X) -> usize {<X as T>::ban}`
|
||||
found fn item `for<'a> fn(&'a X) -> usize {<X as T>::ban}`
|
||||
help: use parentheses to call this associated function
|
||||
|
|
||||
LL | let _: usize = X::ban(/* &X */);
|
||||
|
@ -238,7 +238,7 @@ error[E0308]: mismatched types
|
|||
--> $DIR/fn-or-tuple-struct-without-args.rs:42:20
|
||||
|
|
||||
LL | fn bal(&self) -> usize;
|
||||
| ----------------------- for<'r> fn(&'r X) -> usize {<X as T>::bal} defined here
|
||||
| ----------------------- for<'a> fn(&'a X) -> usize {<X as T>::bal} defined here
|
||||
...
|
||||
LL | let _: usize = X::bal;
|
||||
| ----- ^^^^^^ expected `usize`, found fn item
|
||||
|
@ -246,7 +246,7 @@ LL | let _: usize = X::bal;
|
|||
| expected due to this
|
||||
|
|
||||
= note: expected type `usize`
|
||||
found fn item `for<'r> fn(&'r X) -> usize {<X as T>::bal}`
|
||||
found fn item `for<'a> fn(&'a X) -> usize {<X as T>::bal}`
|
||||
help: use parentheses to call this associated function
|
||||
|
|
||||
LL | let _: usize = X::bal(/* &X */);
|
||||
|
|
|
@ -2,11 +2,11 @@ error[E0308]: mismatched types
|
|||
--> $DIR/issue-101984.rs:21:13
|
||||
|
|
||||
LL | let (cmp, router) = self.router.at()?;
|
||||
| ^^^^^^^^^^^^^ ----------------- this expression has type `Match<&(for<'r> fn(&'r ()), Box<Wrapper>)>`
|
||||
| ^^^^^^^^^^^^^ ----------------- this expression has type `Match<&(for<'a> fn(&'a ()), Box<Wrapper>)>`
|
||||
| |
|
||||
| expected struct `Match`, found tuple
|
||||
|
|
||||
= note: expected struct `Match<&(for<'r> fn(&'r ()), Box<Wrapper>)>`
|
||||
= note: expected struct `Match<&(for<'a> fn(&'a ()), Box<Wrapper>)>`
|
||||
found tuple `(_, _)`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
@ -2,7 +2,7 @@ error[E0308]: mismatched types
|
|||
--> $DIR/return-closures.rs:3:5
|
||||
|
|
||||
LL | fn foo() {
|
||||
| - help: try adding a return type: `-> impl for<'r> Fn(&'r i32) -> i32`
|
||||
| - help: try adding a return type: `-> impl for<'a> Fn(&'a i32) -> i32`
|
||||
LL |
|
||||
LL | |x: &i32| 1i32
|
||||
| ^^^^^^^^^^^^^^ expected `()`, found closure
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue