Always print '_, even for erased lifetimes.
This commit is contained in:
parent
4d44e09cb1
commit
aac2c7ddd8
@ -1088,17 +1088,9 @@ pub trait PrettyPrinter<'tcx>:
|
||||
.generics_of(principal.def_id)
|
||||
.own_substs_no_defaults(cx.tcx(), principal.substs);
|
||||
|
||||
// Don't print `'_` if there's no unerased regions.
|
||||
let print_regions = args.iter().any(|arg| match arg.unpack() {
|
||||
GenericArgKind::Lifetime(r) => !r.is_erased(),
|
||||
_ => false,
|
||||
});
|
||||
let mut args = args.iter().cloned().filter(|arg| match arg.unpack() {
|
||||
GenericArgKind::Lifetime(_) => print_regions,
|
||||
_ => true,
|
||||
});
|
||||
let mut projections = predicates.projection_bounds();
|
||||
|
||||
let mut args = args.iter().cloned();
|
||||
let arg0 = args.next();
|
||||
let projection0 = projections.next();
|
||||
if arg0.is_some() || projection0.is_some() {
|
||||
@ -1847,22 +1839,11 @@ impl<'tcx> Printer<'tcx> for FmtPrinter<'_, 'tcx> {
|
||||
) -> Result<Self::Path, Self::Error> {
|
||||
self = print_prefix(self)?;
|
||||
|
||||
// Don't print `'_` if there's no unerased regions.
|
||||
let print_regions = self.tcx.sess.verbose()
|
||||
|| args.iter().any(|arg| match arg.unpack() {
|
||||
GenericArgKind::Lifetime(r) => !r.is_erased(),
|
||||
_ => false,
|
||||
});
|
||||
let args = args.iter().cloned().filter(|arg| match arg.unpack() {
|
||||
GenericArgKind::Lifetime(_) => print_regions,
|
||||
_ => true,
|
||||
});
|
||||
|
||||
if args.clone().next().is_some() {
|
||||
if args.first().is_some() {
|
||||
if self.in_value {
|
||||
write!(self, "::")?;
|
||||
}
|
||||
self.generic_delimiters(|cx| cx.comma_sep(args))
|
||||
self.generic_delimiters(|cx| cx.comma_sep(args.iter().cloned()))
|
||||
} else {
|
||||
Ok(self)
|
||||
}
|
||||
|
@ -3,15 +3,15 @@
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/derefer_complex_case.rs:+0:11: +0:11
|
||||
let mut _1: std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let mut _1: std::slice::Iter<'_, i32>; // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let mut _2: &[i32; 2]; // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let _3: [i32; 2]; // in scope 0 at $DIR/derefer_complex_case.rs:+1:18: +1:26
|
||||
let mut _4: std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let mut _4: std::slice::Iter<'_, i32>; // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let mut _5: (); // in scope 0 at $DIR/derefer_complex_case.rs:+0:1: +2:2
|
||||
let _6: (); // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let mut _7: std::option::Option<&i32>; // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let mut _8: &mut std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let mut _9: &mut std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let mut _8: &mut std::slice::Iter<'_, i32>; // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let mut _9: &mut std::slice::Iter<'_, i32>; // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let mut _10: isize; // in scope 0 at $DIR/derefer_complex_case.rs:+1:5: +1:40
|
||||
let mut _11: !; // in scope 0 at $DIR/derefer_complex_case.rs:+1:5: +1:40
|
||||
let mut _13: i32; // in scope 0 at $DIR/derefer_complex_case.rs:+1:34: +1:37
|
||||
@ -53,10 +53,10 @@
|
||||
StorageLive(_9); // scope 1 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
_9 = &mut _4; // scope 1 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
_8 = &mut (*_9); // scope 1 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
_7 = <std::slice::Iter<i32> as Iterator>::next(move _8) -> bb3; // scope 1 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
_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<'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>) }
|
||||
}
|
||||
|
||||
bb3: {
|
||||
|
@ -1,12 +1,12 @@
|
||||
- // MIR for `no_downcast` before EarlyOtherwiseBranch
|
||||
+ // MIR for `no_downcast` after EarlyOtherwiseBranch
|
||||
|
||||
fn no_downcast(_1: &E) -> u32 {
|
||||
fn no_downcast(_1: &E<'_>) -> u32 {
|
||||
debug e => _1; // in scope 0 at $DIR/early_otherwise_branch_soundness.rs:+0:16: +0:17
|
||||
let mut _0: u32; // return place in scope 0 at $DIR/early_otherwise_branch_soundness.rs:+0:26: +0:29
|
||||
let mut _2: isize; // in scope 0 at $DIR/early_otherwise_branch_soundness.rs:+1:20: +1:30
|
||||
let mut _3: isize; // in scope 0 at $DIR/early_otherwise_branch_soundness.rs:+1:12: +1:31
|
||||
let mut _4: &E; // in scope 0 at $DIR/early_otherwise_branch_soundness.rs:+0:16: +0:17
|
||||
let mut _4: &E<'_>; // in scope 0 at $DIR/early_otherwise_branch_soundness.rs:+0:16: +0:17
|
||||
scope 1 {
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_4 = deref_copy (((*_1) as Some).0: &E); // scope 1 at $DIR/early_otherwise_branch_soundness.rs:+1:12: +1:31
|
||||
_4 = deref_copy (((*_1) as Some).0: &E<'_>); // scope 1 at $DIR/early_otherwise_branch_soundness.rs:+1:12: +1:31
|
||||
_2 = discriminant((*_4)); // scope 1 at $DIR/early_otherwise_branch_soundness.rs:+1:12: +1:31
|
||||
switchInt(move _2) -> [1_isize: bb2, otherwise: bb3]; // scope 1 at $DIR/early_otherwise_branch_soundness.rs:+1:12: +1:31
|
||||
}
|
||||
|
@ -1,24 +1,24 @@
|
||||
- // MIR for `float_to_exponential_common` before ConstProp
|
||||
+ // MIR for `float_to_exponential_common` after ConstProp
|
||||
|
||||
fn float_to_exponential_common(_1: &mut Formatter, _2: &T, _3: bool) -> Result<(), std::fmt::Error> {
|
||||
fn float_to_exponential_common(_1: &mut Formatter<'_>, _2: &T, _3: bool) -> Result<(), std::fmt::Error> {
|
||||
debug fmt => _1; // in scope 0 at $DIR/funky_arms.rs:+0:35: +0:38
|
||||
debug num => _2; // in scope 0 at $DIR/funky_arms.rs:+0:60: +0:63
|
||||
debug upper => _3; // in scope 0 at $DIR/funky_arms.rs:+0:69: +0:74
|
||||
let mut _0: std::result::Result<(), std::fmt::Error>; // return place in scope 0 at $DIR/funky_arms.rs:+0:85: +0:91
|
||||
let _4: bool; // in scope 0 at $DIR/funky_arms.rs:+4:9: +4:19
|
||||
let mut _5: &std::fmt::Formatter; // in scope 0 at $DIR/funky_arms.rs:+4:22: +4:37
|
||||
let mut _5: &std::fmt::Formatter<'_>; // in scope 0 at $DIR/funky_arms.rs:+4:22: +4:37
|
||||
let mut _7: std::option::Option<usize>; // in scope 0 at $DIR/funky_arms.rs:+13:30: +13:45
|
||||
let mut _8: &std::fmt::Formatter; // in scope 0 at $DIR/funky_arms.rs:+13:30: +13:45
|
||||
let mut _8: &std::fmt::Formatter<'_>; // in scope 0 at $DIR/funky_arms.rs:+13:30: +13:45
|
||||
let mut _9: isize; // in scope 0 at $DIR/funky_arms.rs:+13:12: +13:27
|
||||
let mut _11: &mut std::fmt::Formatter; // in scope 0 at $DIR/funky_arms.rs:+15:43: +15:46
|
||||
let mut _11: &mut std::fmt::Formatter<'_>; // in scope 0 at $DIR/funky_arms.rs:+15:43: +15:46
|
||||
let mut _12: &T; // in scope 0 at $DIR/funky_arms.rs:+15:48: +15:51
|
||||
let mut _13: core::num::flt2dec::Sign; // in scope 0 at $DIR/funky_arms.rs:+15:53: +15:57
|
||||
let mut _14: u32; // in scope 0 at $DIR/funky_arms.rs:+15:59: +15:79
|
||||
let mut _15: u32; // in scope 0 at $DIR/funky_arms.rs:+15:59: +15:75
|
||||
let mut _16: usize; // in scope 0 at $DIR/funky_arms.rs:+15:59: +15:68
|
||||
let mut _17: bool; // in scope 0 at $DIR/funky_arms.rs:+15:81: +15:86
|
||||
let mut _18: &mut std::fmt::Formatter; // in scope 0 at $DIR/funky_arms.rs:+17:46: +17:49
|
||||
let mut _18: &mut std::fmt::Formatter<'_>; // in scope 0 at $DIR/funky_arms.rs:+17:46: +17:49
|
||||
let mut _19: &T; // in scope 0 at $DIR/funky_arms.rs:+17:51: +17:54
|
||||
let mut _20: core::num::flt2dec::Sign; // in scope 0 at $DIR/funky_arms.rs:+17:56: +17:60
|
||||
let mut _21: bool; // in scope 0 at $DIR/funky_arms.rs:+17:62: +17:67
|
||||
@ -38,10 +38,10 @@
|
||||
StorageLive(_4); // scope 0 at $DIR/funky_arms.rs:+4:9: +4:19
|
||||
StorageLive(_5); // scope 0 at $DIR/funky_arms.rs:+4:22: +4:37
|
||||
_5 = &(*_1); // scope 0 at $DIR/funky_arms.rs:+4:22: +4:37
|
||||
_4 = Formatter::sign_plus(move _5) -> bb1; // scope 0 at $DIR/funky_arms.rs:+4:22: +4:37
|
||||
_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<'r> fn(&'r Formatter<'_>) -> bool {Formatter::<'_>::sign_plus}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
@ -66,10 +66,10 @@
|
||||
StorageLive(_7); // scope 3 at $DIR/funky_arms.rs:+13:30: +13:45
|
||||
StorageLive(_8); // scope 3 at $DIR/funky_arms.rs:+13:30: +13:45
|
||||
_8 = &(*_1); // scope 3 at $DIR/funky_arms.rs:+13:30: +13:45
|
||||
_7 = Formatter::precision(move _8) -> bb5; // scope 3 at $DIR/funky_arms.rs:+13:30: +13:45
|
||||
_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<'r> fn(&'r Formatter<'_>) -> Option<usize> {Formatter::<'_>::precision}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb5: {
|
||||
|
@ -25,7 +25,7 @@
|
||||
let _24: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _25: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _26: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _27: std::option::Option<std::fmt::Arguments>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _27: std::option::Option<std::fmt::Arguments<'_>>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
scope 1 {
|
||||
debug split => _1; // in scope 1 at $DIR/issue-73223.rs:+1:9: +1:14
|
||||
let _6: std::option::Option<i32>; // in scope 1 at $DIR/issue-73223.rs:+6:9: +6:14
|
||||
|
@ -26,7 +26,7 @@ fn main() -> () {
|
||||
let _19: &&[u8]; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _20: &&[u8; 4]; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _21: &&[u8; 4]; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _22: std::option::Option<std::fmt::Arguments>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _22: std::option::Option<std::fmt::Arguments<'_>>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _23: (); // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _24: (&&[u8], &&[u8; 4]); // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _25: &&[u8]; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
@ -46,7 +46,7 @@ fn main() -> () {
|
||||
let _40: &&[u8]; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _41: &&[u8; 4]; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _42: &&[u8; 4]; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _43: std::option::Option<std::fmt::Arguments>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _43: std::option::Option<std::fmt::Arguments<'_>>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
scope 1 {
|
||||
debug left_val => _8; // in scope 1 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug right_val => _9; // in scope 1 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
@ -128,7 +128,7 @@ fn main() -> () {
|
||||
_21 = &(*_9); // scope 2 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_20 = &(*_21); // scope 2 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_22); // scope 2 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_22 = Option::<Arguments>::None; // scope 2 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_22 = Option::<Arguments<'_>>::None; // scope 2 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_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
|
||||
@ -237,7 +237,7 @@ fn main() -> () {
|
||||
_42 = &(*_30); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_41 = &(*_42); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_43); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_43 = Option::<Arguments>::None; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_43 = Option::<Arguments<'_>>::None; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_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
|
||||
|
@ -29,7 +29,7 @@ fn array_casts() -> () {
|
||||
let _31: &usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _32: &usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _33: &usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _34: std::option::Option<std::fmt::Arguments>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _34: std::option::Option<std::fmt::Arguments<'_>>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/retag.rs:+1:9: +1:14
|
||||
let _2: *mut usize; // in scope 1 at $DIR/retag.rs:+2:9: +2:10
|
||||
|
@ -1,16 +1,16 @@
|
||||
error[E0391]: cycle detected when resolving instance `<LazyUpdim<T, { T::DIM }, DIM> as TensorDimension>::DIM`
|
||||
error[E0391]: cycle detected when resolving instance `<LazyUpdim<'_, T, { T::DIM }, DIM> as TensorDimension>::DIM`
|
||||
--> $DIR/issue-83765.rs:5:5
|
||||
|
|
||||
LL | const DIM: usize;
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: ...which requires computing candidate for `<LazyUpdim<T, { T::DIM }, DIM> as TensorDimension>`...
|
||||
note: ...which requires computing candidate for `<LazyUpdim<'_, T, { T::DIM }, DIM> as TensorDimension>`...
|
||||
--> $DIR/issue-83765.rs:4:1
|
||||
|
|
||||
LL | trait TensorDimension {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: ...which again requires resolving instance `<LazyUpdim<T, { T::DIM }, DIM> as TensorDimension>::DIM`, completing the cycle
|
||||
note: cycle used when computing candidate for `<LazyUpdim<T, { T::DIM }, DIM> as TensorDimension>`
|
||||
= note: ...which again requires resolving instance `<LazyUpdim<'_, T, { T::DIM }, DIM> as TensorDimension>::DIM`, completing the cycle
|
||||
note: cycle used when computing candidate for `<LazyUpdim<'_, T, { T::DIM }, DIM> as TensorDimension>`
|
||||
--> $DIR/issue-83765.rs:4:1
|
||||
|
|
||||
LL | trait TensorDimension {
|
||||
|
@ -5,7 +5,7 @@ LL | &*ptr::slice_from_raw_parts(data, len)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
|
||||
| inside `std::slice::from_raw_parts::<u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
| inside `std::slice::from_raw_parts::<'_, u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
|
|
||||
::: $DIR/forbidden_slices.rs:18:34
|
||||
|
|
||||
@ -19,7 +19,7 @@ LL | &*ptr::slice_from_raw_parts(data, len)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
|
||||
| inside `std::slice::from_raw_parts::<()>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
| inside `std::slice::from_raw_parts::<'_, ()>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
|
|
||||
::: $DIR/forbidden_slices.rs:19:33
|
||||
|
|
||||
@ -33,7 +33,7 @@ LL | &*ptr::slice_from_raw_parts(data, len)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| dereferencing pointer failed: ALLOC_ID has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
|
||||
| inside `std::slice::from_raw_parts::<u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
| inside `std::slice::from_raw_parts::<'_, u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
|
|
||||
::: $DIR/forbidden_slices.rs:22:34
|
||||
|
|
||||
@ -92,7 +92,7 @@ LL | &*ptr::slice_from_raw_parts(data, len)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| dereferencing pointer failed: ALLOC_ID has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
|
||||
| inside `std::slice::from_raw_parts::<u64>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
| inside `std::slice::from_raw_parts::<'_, u64>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
|
|
||||
::: $DIR/forbidden_slices.rs:43:5
|
||||
|
|
||||
@ -111,7 +111,7 @@ LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
|
||||
::: $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
|
|
||||
LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
|
||||
| ------------------------------ inside `from_ptr_range::<u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
| ------------------------------ inside `from_ptr_range::<'_, u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
|
|
||||
::: $DIR/forbidden_slices.rs:46:34
|
||||
|
|
||||
@ -130,7 +130,7 @@ LL | assert!(0 < pointee_size && pointee_size <= isize::MAX as usize);
|
||||
::: $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
|
|
||||
LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
|
||||
| ------------------------------ inside `from_ptr_range::<()>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
| ------------------------------ inside `from_ptr_range::<'_, ()>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
|
|
||||
::: $DIR/forbidden_slices.rs:47:33
|
||||
|
|
||||
@ -230,7 +230,7 @@ LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
|
||||
::: $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
|
|
||||
LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
|
||||
| ------------------------------ inside `from_ptr_range::<u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
| ------------------------------ inside `from_ptr_range::<'_, u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
|
|
||||
::: $DIR/forbidden_slices.rs:79:34
|
||||
|
|
||||
@ -249,7 +249,7 @@ LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
|
||||
::: $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
|
|
||||
LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
|
||||
| ------------------------------ inside `from_ptr_range::<u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
| ------------------------------ inside `from_ptr_range::<'_, u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
|
||||
|
|
||||
::: $DIR/forbidden_slices.rs:80:35
|
||||
|
|
||||
|
@ -4,8 +4,8 @@ error[E0512]: cannot transmute between types of different sizes, or dependently-
|
||||
LL | let new: T::B = unsafe { std::mem::transmute(value) };
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: source type: `<T as Trait>::A` (this type does not have a fixed size)
|
||||
= note: target type: `<T as Trait>::B` (this type does not have a fixed size)
|
||||
= note: source type: `<T as Trait<'_>>::A` (this type does not have a fixed size)
|
||||
= note: target type: `<T as Trait<'_>>::B` (this type does not have a fixed size)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -41,7 +41,7 @@ error: item has unused generic parameters
|
||||
LL | fn bar<I>() {
|
||||
| ^^^ - generic parameter `I` is unused
|
||||
|
||||
note: the above error was encountered while instantiating `fn foo::<std::slice::Iter<u32>, T>`
|
||||
note: the above error was encountered while instantiating `fn foo::<std::slice::Iter<'_, u32>, T>`
|
||||
--> $DIR/predicates.rs:86:5
|
||||
|
|
||||
LL | foo(x.iter());
|
||||
|
@ -6,7 +6,7 @@ LL | let Ok(x) = res;
|
||||
|
|
||||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||
note: `Result<u32, &R>` defined here
|
||||
note: `Result<u32, &R<'_>>` defined here
|
||||
--> $SRC_DIR/core/src/result.rs:LL:COL
|
||||
|
|
||||
LL | pub enum Result<T, E> {
|
||||
@ -14,7 +14,7 @@ LL | pub enum Result<T, E> {
|
||||
...
|
||||
LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
|
||||
| ^^^ not covered
|
||||
= note: the matched value is of type `Result<u32, &R>`
|
||||
= note: the matched value is of type `Result<u32, &R<'_>>`
|
||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||
|
|
||||
LL | let x = if let Ok(x) = res { x } else { todo!() };
|
||||
|
@ -10,7 +10,7 @@ LL | #![feature(specialization)]
|
||||
|
||||
error[E0275]: overflow evaluating the requirement `i32: Check`
|
||||
|
|
||||
note: required for `i32` to implement `Iterate`
|
||||
note: required for `i32` to implement `Iterate<'_>`
|
||||
--> $DIR/issue-38091-2.rs:11:13
|
||||
|
|
||||
LL | impl<'a, T> Iterate<'a> for T
|
||||
|
@ -4,7 +4,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently-
|
||||
LL | transmute(x)
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: `<C as TypeConstructor>::T` does not have a fixed size
|
||||
= note: `<C as TypeConstructor<'_>>::T` does not have a fixed size
|
||||
|
||||
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
||||
--> $DIR/main.rs:17:17
|
||||
|
Loading…
x
Reference in New Issue
Block a user