diff options
Diffstat (limited to 'tests')
261 files changed, 11817 insertions, 963 deletions
diff --git a/tests/assembly/riscv-soft-abi-with-float-features.rs b/tests/assembly/riscv-soft-abi-with-float-features.rs index 6d6001af084..8ccfa72a7b6 100644 --- a/tests/assembly/riscv-soft-abi-with-float-features.rs +++ b/tests/assembly/riscv-soft-abi-with-float-features.rs @@ -2,7 +2,7 @@ //@ compile-flags: --target riscv64imac-unknown-none-elf -Ctarget-feature=+f,+d //@ needs-llvm-components: riscv //@ revisions: LLVM-PRE-20 LLVM-POST-20 -//@ [LLVM-PRE-20] ignore-llvm-version: 20 - 99 +//@ [LLVM-PRE-20] max-llvm-major-version: 19 //@ [LLVM-POST-20] min-llvm-version: 20 #![feature(no_core, lang_items, f16)] diff --git a/tests/assembly/x86_64-cmp.rs b/tests/assembly/x86_64-cmp.rs index 67b7ff99ae2..8cccab7d40d 100644 --- a/tests/assembly/x86_64-cmp.rs +++ b/tests/assembly/x86_64-cmp.rs @@ -1,7 +1,7 @@ //@ revisions: DEBUG LLVM-PRE-20-OPTIM LLVM-20-OPTIM //@ [DEBUG] compile-flags: -C opt-level=0 //@ [LLVM-PRE-20-OPTIM] compile-flags: -C opt-level=3 -//@ [LLVM-PRE-20-OPTIM] ignore-llvm-version: 20 - 99 +//@ [LLVM-PRE-20-OPTIM] max-llvm-major-version: 19 //@ [LLVM-20-OPTIM] compile-flags: -C opt-level=3 //@ [LLVM-20-OPTIM] min-llvm-version: 20 //@ assembly-output: emit-asm diff --git a/tests/codegen/branch-protection-old-llvm.rs b/tests/codegen/branch-protection-old-llvm.rs index bb3c7a4b70c..1846f35479d 100644 --- a/tests/codegen/branch-protection-old-llvm.rs +++ b/tests/codegen/branch-protection-old-llvm.rs @@ -7,7 +7,7 @@ //@ [LEAF] compile-flags: -Z branch-protection=pac-ret,leaf //@ [BKEY] compile-flags: -Z branch-protection=pac-ret,b-key //@ compile-flags: --target aarch64-unknown-linux-gnu -//@ ignore-llvm-version: 19 - 99 +//@ max-llvm-major-version: 18 #![crate_type = "lib"] #![feature(no_core, lang_items)] diff --git a/tests/codegen/call-metadata.rs b/tests/codegen/call-metadata.rs index 73c4b33e2cf..b986b4467fa 100644 --- a/tests/codegen/call-metadata.rs +++ b/tests/codegen/call-metadata.rs @@ -2,7 +2,7 @@ // scalar value. //@ compile-flags: -O -C no-prepopulate-passes -//@ ignore-llvm-version: 19 - 99 +//@ max-llvm-major-version: 18 #![crate_type = "lib"] diff --git a/tests/codegen/checked_math.rs b/tests/codegen/checked_math.rs index 63f5c3d34f7..c612ddccdaa 100644 --- a/tests/codegen/checked_math.rs +++ b/tests/codegen/checked_math.rs @@ -90,7 +90,7 @@ pub fn checked_shr_signed(a: i32, b: u32) -> Option<i32> { #[no_mangle] pub fn checked_add_one_unwrap_unsigned(x: u32) -> u32 { // CHECK: %[[IS_MAX:.+]] = icmp eq i32 %x, -1 - // CHECK: br i1 %[[IS_MAX]], label %[[NONE_BB:.+]], label %[[SOME_BB:.+]] + // CHECK: br i1 %[[IS_MAX]], label %[[NONE_BB:.+]], label %[[SOME_BB:.+]], // CHECK: [[SOME_BB]]: // CHECK: %[[R:.+]] = add nuw i32 %x, 1 // CHECK: ret i32 %[[R]] diff --git a/tests/codegen/float/f16-f128-inline.rs b/tests/codegen/float/f16-f128-inline.rs new file mode 100644 index 00000000000..aa2c38c209e --- /dev/null +++ b/tests/codegen/float/f16-f128-inline.rs @@ -0,0 +1,29 @@ +//@ revisions: default nopt +//@[nopt] compile-flags: -Copt-level=0 -Zcross-crate-inline-threshold=never -Zmir-opt-level=0 -Cno-prepopulate-passes + +// Ensure that functions using `f16` and `f128` are always inlined to avoid crashes +// when the backend does not support these types. + +#![crate_type = "lib"] +#![feature(f128)] +#![feature(f16)] + +pub fn f16_arg(_a: f16) { + // CHECK-NOT: f16_arg + todo!() +} + +pub fn f16_ret() -> f16 { + // CHECK-NOT: f16_ret + todo!() +} + +pub fn f128_arg(_a: f128) { + // CHECK-NOT: f128_arg + todo!() +} + +pub fn f128_ret() -> f128 { + // CHECK-NOT: f128_ret + todo!() +} diff --git a/tests/codegen/integer-cmp.rs b/tests/codegen/integer-cmp.rs index 8df68d8d490..9bbf243946d 100644 --- a/tests/codegen/integer-cmp.rs +++ b/tests/codegen/integer-cmp.rs @@ -3,7 +3,7 @@ //@ revisions: llvm-pre-20 llvm-20 //@ [llvm-20] min-llvm-version: 20 -//@ [llvm-pre-20] ignore-llvm-version: 20 - 99 +//@ [llvm-pre-20] max-llvm-major-version: 19 //@ compile-flags: -C opt-level=3 #![crate_type = "lib"] diff --git a/tests/codegen/intrinsics/cold_path.rs b/tests/codegen/intrinsics/cold_path.rs new file mode 100644 index 00000000000..24ee84e07bf --- /dev/null +++ b/tests/codegen/intrinsics/cold_path.rs @@ -0,0 +1,13 @@ +//@ compile-flags: -O +#![crate_type = "lib"] +#![feature(core_intrinsics)] + +use std::intrinsics::cold_path; + +#[no_mangle] +pub fn test_cold_path(x: bool) { + cold_path(); +} + +// CHECK-LABEL: @test_cold_path( +// CHECK-NOT: cold_path diff --git a/tests/codegen/intrinsics/likely.rs b/tests/codegen/intrinsics/likely.rs index 9dc31d21045..e318390db20 100644 --- a/tests/codegen/intrinsics/likely.rs +++ b/tests/codegen/intrinsics/likely.rs @@ -1,22 +1,35 @@ -//@ compile-flags: -C no-prepopulate-passes -Copt-level=1 - +//@ compile-flags: -O #![crate_type = "lib"] #![feature(core_intrinsics)] -use std::intrinsics::{likely, unlikely}; +use std::intrinsics::likely; +#[inline(never)] #[no_mangle] -pub fn check_likely(x: i32, y: i32) -> Option<i32> { - unsafe { - // CHECK: call i1 @llvm.expect.i1(i1 %{{.*}}, i1 true) - if likely(x == y) { None } else { Some(x + y) } - } +pub fn path_a() { + println!("path a"); +} + +#[inline(never)] +#[no_mangle] +pub fn path_b() { + println!("path b"); } #[no_mangle] -pub fn check_unlikely(x: i32, y: i32) -> Option<i32> { - unsafe { - // CHECK: call i1 @llvm.expect.i1(i1 %{{.*}}, i1 false) - if unlikely(x == y) { None } else { Some(x + y) } +pub fn test_likely(x: bool) { + if likely(x) { + path_a(); + } else { + path_b(); } } + +// CHECK-LABEL: @test_likely( +// CHECK: br i1 %x, label %bb2, label %bb3, !prof ![[NUM:[0-9]+]] +// CHECK: bb3: +// CHECK-NOT: cold_path +// CHECK: path_b +// CHECK: bb2: +// CHECK: path_a +// CHECK: ![[NUM]] = !{!"branch_weights", {{(!"expected", )?}}i32 2000, i32 1} diff --git a/tests/codegen/intrinsics/likely_assert.rs b/tests/codegen/intrinsics/likely_assert.rs new file mode 100644 index 00000000000..0ddbd6206ae --- /dev/null +++ b/tests/codegen/intrinsics/likely_assert.rs @@ -0,0 +1,17 @@ +//@ compile-flags: -O +#![crate_type = "lib"] + +#[no_mangle] +pub fn test_assert(x: bool) { + assert!(x); +} + +// check that assert! emits branch weights + +// CHECK-LABEL: @test_assert( +// CHECK: br i1 %x, label %bb2, label %bb1, !prof ![[NUM:[0-9]+]] +// CHECK: bb1: +// CHECK: panic +// CHECK: bb2: +// CHECK: ret void +// CHECK: ![[NUM]] = !{!"branch_weights", {{(!"expected", )?}}i32 2000, i32 1} diff --git a/tests/codegen/intrinsics/unlikely.rs b/tests/codegen/intrinsics/unlikely.rs new file mode 100644 index 00000000000..2d776031a52 --- /dev/null +++ b/tests/codegen/intrinsics/unlikely.rs @@ -0,0 +1,35 @@ +//@ compile-flags: -O +#![crate_type = "lib"] +#![feature(core_intrinsics)] + +use std::intrinsics::unlikely; + +#[inline(never)] +#[no_mangle] +pub fn path_a() { + println!("path a"); +} + +#[inline(never)] +#[no_mangle] +pub fn path_b() { + println!("path b"); +} + +#[no_mangle] +pub fn test_unlikely(x: bool) { + if unlikely(x) { + path_a(); + } else { + path_b(); + } +} + +// CHECK-LABEL: @test_unlikely( +// CHECK: br i1 %x, label %bb2, label %bb4, !prof ![[NUM:[0-9]+]] +// CHECK: bb4: +// CHECK: path_b +// CHECK: bb2: +// CHECK-NOT: cold_path +// CHECK: path_a +// CHECK: ![[NUM]] = !{!"branch_weights", {{(!"expected", )?}}i32 1, i32 2000} diff --git a/tests/crashes/113280.rs b/tests/crashes/113280.rs deleted file mode 100644 index 86677f416fe..00000000000 --- a/tests/crashes/113280.rs +++ /dev/null @@ -1,16 +0,0 @@ -//@ known-bug: #113280 -//@ only-x86_64 - -#![feature(dyn_star, pointer_like_trait)] -#![allow(incomplete_features)] - -use std::fmt::Debug; -use std::marker::PointerLike; - -fn make_dyn_star<'a>(t: impl PointerLike + Debug + 'a) -> dyn* Debug + 'a { - f32::from_bits(0x1) as f64 -} - -fn main() { - println!("{:?}", make_dyn_star(Box::new(1i32))); -} diff --git a/tests/crashes/123077-2.rs b/tests/crashes/123077-2.rs deleted file mode 100644 index e086e330337..00000000000 --- a/tests/crashes/123077-2.rs +++ /dev/null @@ -1,12 +0,0 @@ -//@ known-bug: #123077 -//@ only-x86_64 -use std::arch::x86_64::{__m128, _mm_blend_ps}; - -pub fn sse41_blend_noinline( ) -> __m128 { - let f = { |x, y| unsafe { - _mm_blend_ps(x, y, { |x, y| unsafe }) - }}; - f(x, y) -} - -pub fn main() {} diff --git a/tests/crashes/127676.rs b/tests/crashes/127676.rs deleted file mode 100644 index 81149c2ef84..00000000000 --- a/tests/crashes/127676.rs +++ /dev/null @@ -1,8 +0,0 @@ -//@ known-bug: #127676 -//@ edition:2018 - -#![feature(dyn_star,const_async_blocks)] - -static S: dyn* Send + Sync = async { 42 }; - -pub fn main() {} diff --git a/tests/crashes/129150.rs b/tests/crashes/129150.rs deleted file mode 100644 index 9f8c2ba1739..00000000000 --- a/tests/crashes/129150.rs +++ /dev/null @@ -1,7 +0,0 @@ -//@ known-bug: rust-lang/rust#129150 -//@ only-x86_64 -use std::arch::x86_64::_mm_blend_ps; - -pub fn main() { - _mm_blend_ps(1, 2, &const {} ); -} diff --git a/tests/crashes/130687.rs b/tests/crashes/130687.rs deleted file mode 100644 index 361be0905df..00000000000 --- a/tests/crashes/130687.rs +++ /dev/null @@ -1,4 +0,0 @@ -//@ known-bug: #130687 -//@ only-x86_64 -pub struct Data([u8; usize::MAX >> 16]); -const _: &'static Data = &Data([0; usize::MAX >> 16]); diff --git a/tests/crashes/131535.rs b/tests/crashes/131535.rs deleted file mode 100644 index 47ccdf87f2d..00000000000 --- a/tests/crashes/131535.rs +++ /dev/null @@ -1,4 +0,0 @@ -//@ known-bug: #131535 -#![feature(non_lifetime_binders)] -trait v0<> {} -fn kind :(v0<'_, > impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {} diff --git a/tests/crashes/131637.rs b/tests/crashes/131637.rs deleted file mode 100644 index 7d328384a74..00000000000 --- a/tests/crashes/131637.rs +++ /dev/null @@ -1,7 +0,0 @@ -//@ known-bug: #121637 -#![feature(non_lifetime_binders)] -trait Trait<Type> { - type Type; - - fn method(&self) -> impl for<T> Trait<impl Trait<T>>; -} diff --git a/tests/crashes/132530.rs b/tests/crashes/132530.rs deleted file mode 100644 index b43da62bfc1..00000000000 --- a/tests/crashes/132530.rs +++ /dev/null @@ -1,9 +0,0 @@ -//@ known-bug: #132530 - -#![feature(non_lifetime_binders)] - -trait Trait<'a, A> { - type Assoc<'a> = i32; -} - -fn a() -> impl for<T> Trait<Assoc = impl Trait<T>> {} diff --git a/tests/crashes/132985.rs b/tests/crashes/132985.rs new file mode 100644 index 00000000000..2735074f44d --- /dev/null +++ b/tests/crashes/132985.rs @@ -0,0 +1,17 @@ +//@ known-bug: #132985 +//@ aux-build:aux132985.rs + +#![allow(incomplete_features)] +#![feature(min_generic_const_args)] +#![feature(adt_const_params)] + +extern crate aux132985; +use aux132985::Foo; + +fn bar<const N: Foo>() {} + +fn baz() { + bar::<{ Foo }>(); +} + +fn main() {} diff --git a/tests/crashes/auxiliary/aux132985.rs b/tests/crashes/auxiliary/aux132985.rs new file mode 100644 index 00000000000..7ae5567bdc5 --- /dev/null +++ b/tests/crashes/auxiliary/aux132985.rs @@ -0,0 +1,6 @@ +#![feature(adt_const_params)] + +use std::marker::ConstParamTy; + +#[derive(Eq, PartialEq, ConstParamTy)] +pub struct Foo; diff --git a/tests/debuginfo/numeric-types.rs b/tests/debuginfo/numeric-types.rs index 9d232578979..9a0fd01d7e2 100644 --- a/tests/debuginfo/numeric-types.rs +++ b/tests/debuginfo/numeric-types.rs @@ -2,6 +2,14 @@ //@ ignore-windows-gnu: #128981 +// Note: u128 visualization was not supported in 10.0.22621.3233 but was fixed in 10.0.26100.2161. + +// FIXME(#133107): this is temporarily marked as `only-64bit` because of course 32-bit msvc has +// a different integer width and thus underlying integer type display. Only marked as such to +// unblock the tree. +//@ only-64bit +//@ min-cdb-version: 10.0.26100.2161 + // Tests the visualizations for `NonZero<T>`, `Wrapping<T>` and // `Atomic{Bool,I8,I16,I32,I64,Isize,U8,U16,U32,U64,Usize}` located in `libcore.natvis`. @@ -48,8 +56,8 @@ // cdb-check:nz_u64 : 0x64 [Type: core::num::nonzero::NonZero<u64>] // cdb-check: [<Raw View>] [Type: core::num::nonzero::NonZero<u64>] -// 128-bit integers don't seem to work in CDB // cdb-command: dx nz_u128 +// cdb-check:nz_u128 : 111 [Type: core::num::nonzero::NonZero<u128>] // cdb-check: [<Raw View>] [Type: core::num::nonzero::NonZero<u128>] // cdb-command: dx nz_usize @@ -58,101 +66,99 @@ // cdb-command: dx w_i8 // cdb-check:w_i8 : 10 [Type: core::num::wrapping::Wrapping<i8>] -// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<i8>] +// cdb-check: [+0x000] __0 : 10 [Type: char] // cdb-command: dx w_i16 // cdb-check:w_i16 : 20 [Type: core::num::wrapping::Wrapping<i16>] -// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<i16>] +// cdb-check: [+0x000] __0 : 20 [Type: short] // cdb-command: dx w_i32 // cdb-check:w_i32 : 30 [Type: core::num::wrapping::Wrapping<i32>] -// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<i32>] +// cdb-check: [+0x000] __0 : 30 [Type: int] // cdb-command: dx w_i64 // cdb-check:w_i64 : 40 [Type: core::num::wrapping::Wrapping<i64>] -// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<i64>] +// cdb-check: [+0x000] __0 : 40 [Type: __int64] -// 128-bit integers don't seem to work in CDB // cdb-command: dx w_i128 -// cdb-check:w_i128 [Type: core::num::wrapping::Wrapping<i128>] -// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<i128>] +// cdb-check:w_i128 : 50 [Type: core::num::wrapping::Wrapping<i128>] +// cdb-check: [+0x000] __0 : 50 [Type: i128] // cdb-command: dx w_isize // cdb-check:w_isize : 60 [Type: core::num::wrapping::Wrapping<isize>] -// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<isize>] +// cdb-check: [+0x000] __0 : 60 [Type: __int64] // cdb-command: dx w_u8 // cdb-check:w_u8 : 0x46 [Type: core::num::wrapping::Wrapping<u8>] -// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<u8>] +// cdb-check: [+0x000] __0 : 0x46 [Type: unsigned char] // cdb-command: dx w_u16 // cdb-check:w_u16 : 0x50 [Type: core::num::wrapping::Wrapping<u16>] -// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<u16>] +// cdb-check: [+0x000] __0 : 0x50 [Type: unsigned short] // cdb-command: dx w_u32 // cdb-check:w_u32 : 0x5a [Type: core::num::wrapping::Wrapping<u32>] -// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<u32>] +// cdb-check: [+0x000] __0 : 0x5a [Type: unsigned int] // cdb-command: dx w_u64 // cdb-check:w_u64 : 0x64 [Type: core::num::wrapping::Wrapping<u64>] -// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<u64>] +// cdb-check: [+0x000] __0 : 0x64 [Type: unsigned __int64] -// 128-bit integers don't seem to work in CDB // cdb-command: dx w_u128 -// cdb-check:w_u128 [Type: core::num::wrapping::Wrapping<u128>] -// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<u128>] +// cdb-check:w_u128 : 110 [Type: core::num::wrapping::Wrapping<u128>] +// cdb-check: [+0x000] __0 : 110 [Type: u128] // cdb-command: dx w_usize // cdb-check:w_usize : 0x78 [Type: core::num::wrapping::Wrapping<usize>] -// cdb-check: [<Raw View>] [Type: core::num::wrapping::Wrapping<usize>] +// cdb-check: [+0x000] __0 : 0x78 [Type: unsigned __int64] // cdb-command: dx a_bool_t // cdb-check:a_bool_t : true [Type: core::sync::atomic::AtomicBool] -// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicBool] +// cdb-check: [+0x000] v : 0x1 [Type: core::cell::UnsafeCell<u8>] // cdb-command: dx a_bool_f // cdb-check:a_bool_f : false [Type: core::sync::atomic::AtomicBool] -// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicBool] +// cdb-check: [+0x000] v : 0x0 [Type: core::cell::UnsafeCell<u8>] // cdb-command: dx a_i8 // cdb-check:a_i8 : 2 [Type: core::sync::atomic::AtomicI8] -// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicI8] +// cdb-check: [+0x000] v : 2 [Type: core::cell::UnsafeCell<i8>] // cdb-command: dx a_i16 // cdb-check:a_i16 : 4 [Type: core::sync::atomic::AtomicI16] -// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicI16] +// cdb-check: [+0x000] v : 4 [Type: core::cell::UnsafeCell<i16>] // cdb-command: dx a_i32 // cdb-check:a_i32 : 8 [Type: core::sync::atomic::AtomicI32] -// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicI32] +// cdb-check: [+0x000] v : 8 [Type: core::cell::UnsafeCell<i32>] // cdb-command: dx a_i64 // cdb-check:a_i64 : 16 [Type: core::sync::atomic::AtomicI64] -// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicI64] +// cdb-check: [+0x000] v : 16 [Type: core::cell::UnsafeCell<i64>] // cdb-command: dx a_isize // cdb-check:a_isize : 32 [Type: core::sync::atomic::AtomicIsize] -// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicIsize] +// cdb-check: [+0x000] v : 32 [Type: core::cell::UnsafeCell<isize>] // cdb-command: dx a_u8 // cdb-check:a_u8 : 0x40 [Type: core::sync::atomic::AtomicU8] -// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicU8] +// cdb-check: [+0x000] v : 0x40 [Type: core::cell::UnsafeCell<u8>] // cdb-command: dx a_u16 // cdb-check:a_u16 : 0x80 [Type: core::sync::atomic::AtomicU16] -// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicU16] +// cdb-check: [+0x000] v : 0x80 [Type: core::cell::UnsafeCell<u16>] // cdb-command: dx a_u32 // cdb-check:a_u32 : 0x100 [Type: core::sync::atomic::AtomicU32] -// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicU32] +// cdb-check: [+0x000] v : 0x100 [Type: core::cell::UnsafeCell<u32>] // cdb-command: dx a_u64 // cdb-check:a_u64 : 0x200 [Type: core::sync::atomic::AtomicU64] -// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicU64] +// cdb-check: [+0x000] v : 0x200 [Type: core::cell::UnsafeCell<u64>] // cdb-command: dx a_usize // cdb-check:a_usize : 0x400 [Type: core::sync::atomic::AtomicUsize] -// cdb-check: [<Raw View>] [Type: core::sync::atomic::AtomicUsize] +// cdb-check: [+0x000] v : 0x400 [Type: core::cell::UnsafeCell<usize>] // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/range-types.rs b/tests/debuginfo/range-types.rs index 8c18fd9addd..068a55a5767 100644 --- a/tests/debuginfo/range-types.rs +++ b/tests/debuginfo/range-types.rs @@ -1,7 +1,10 @@ // Testing the display of range types in cdb. -// cdb-only -//@ min-cdb-version: 10.0.18317.1001 +//@ only-cdb + +// FIXME(jieyouxu): triple check in CI if the directive actually works +//@ min-cdb-version: 10.0.26100.2161 + //@ compile-flags:-g // === CDB TESTS ================================================================================== @@ -10,23 +13,26 @@ // cdb-command: dx r1,d // cdb-check:r1,d : (3..5) [Type: core::ops::range::Range<i32>] -// cdb-check: [<Raw View>] [Type: core::ops::range::Range<i32>] +// cdb-check: [+0x000] start : 3 [Type: int] +// cdb-check: [+0x004] end : 5 [Type: int] // cdb-command: dx r2,d // cdb-check:r2,d : (2..) [Type: core::ops::range::RangeFrom<i32>] -// cdb-check: [<Raw View>] [Type: core::ops::range::RangeFrom<i32>] +// cdb-check: [+0x000] start : 2 [Type: int] // cdb-command: dx r3,d // cdb-check:r3,d : (1..=4) [Type: core::ops::range::RangeInclusive<i32>] -// cdb-check: [<Raw View>] [Type: core::ops::range::RangeInclusive<i32>] +// cdb-check: [+0x000] start : 1 [Type: int] +// cdb-check: [+0x004] end : 4 [Type: int] +// cdb-check: [+0x008] exhausted : false [Type: bool] // cdb-command: dx r4,d // cdb-check:r4,d : (..10) [Type: core::ops::range::RangeTo<i32>] -// cdb-check: [<Raw View>] [Type: core::ops::range::RangeTo<i32>] +// cdb-check: [+0x000] end : 10 [Type: int] // cdb-command: dx r5,d // cdb-check:r5,d : (..=3) [Type: core::ops::range::RangeToInclusive<i32>] -// cdb-check: [<Raw View>] [Type: core::ops::range::RangeToInclusive<i32>] +// cdb-check: [+0x000] end : 3 [Type: int] // cdb-command: dx r6,d // cdb-check:r6,d [Type: core::ops::range::RangeFull] diff --git a/tests/debuginfo/unit-type.rs b/tests/debuginfo/unit-type.rs index 42c0ff11f71..0ffa2fe490a 100644 --- a/tests/debuginfo/unit-type.rs +++ b/tests/debuginfo/unit-type.rs @@ -1,5 +1,8 @@ //@ compile-flags:-g +// FIXME(jieyouxu): triple check if this works in CI +//@ min-cdb-version: 10.0.26100.2161 + // === GDB TESTS =================================================================================== // gdb-command: run @@ -26,18 +29,18 @@ // cdb-check: Breakpoint 0 hit // cdb-command: dx _ref -// cdb-check: _ref : 0x[...] : () [Type: tuple$<> *] +// cdb-check: _ref : 0x[...] [Type: tuple$<> *] // cdb-command: dx _ptr -// cdb-check: _ptr : 0x[...] : () [Type: tuple$<> *] +// cdb-check: _ptr : 0x[...] [Type: tuple$<> *] // cdb-command: dx _local -// cdb-check: _local : () [Type: tuple$<>] +// cdb-check: _local [Type: tuple$<>] // cdb-command: dx _field,d // cdb-check: _field,d [Type: unit_type::_TypeContainingUnitField] // cdb-check: [+0x[...]] _a : 123 [Type: unsigned int] -// cdb-check: [+0x[...]] _unit : () [Type: tuple$<>] +// cdb-check: [+0x[...]] _unit [Type: tuple$<>] // cdb-check: [+0x[...]] _b : 456 [Type: unsigned __int64] // Check that we can cast "void pointers" to their actual type in the debugger diff --git a/tests/incremental/hygiene/load_cached_hygiene.rs b/tests/incremental/hygiene/load_cached_hygiene.rs index 4ad9c7d49fd..101d280cd49 100644 --- a/tests/incremental/hygiene/load_cached_hygiene.rs +++ b/tests/incremental/hygiene/load_cached_hygiene.rs @@ -7,7 +7,7 @@ // This causes hygiene information to be saved to the incr cache. // 2. One function is the foreign crate is modified. This causes the // optimized mir for an unmodified function to be loaded from the -//@ incremental cache and written out to the crate metadata. +// incremental cache and written out to the crate metadata. // 3. In the process of loading and writing out this function's MIR, // we load hygiene information from the incremental cache and // write it to our metadata. diff --git a/tests/mir-opt/pre-codegen/checked_ops.step_forward.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/checked_ops.step_forward.PreCodegen.after.panic-abort.mir index 935e67fc3c0..cff5b4c7243 100644 --- a/tests/mir-opt/pre-codegen/checked_ops.step_forward.PreCodegen.after.panic-abort.mir +++ b/tests/mir-opt/pre-codegen/checked_ops.step_forward.PreCodegen.after.panic-abort.mir @@ -13,7 +13,9 @@ fn step_forward(_1: u16, _2: usize) -> u16 { scope 6 (inlined core::num::<impl u16>::checked_add) { let mut _5: (u16, bool); let mut _6: bool; - let mut _7: bool; + scope 7 (inlined unlikely) { + let _7: (); + } } } scope 5 (inlined convert::num::ptr_try_from_impls::<impl TryFrom<usize> for u16>::try_from) { @@ -21,11 +23,11 @@ fn step_forward(_1: u16, _2: usize) -> u16 { let mut _4: u16; } } - scope 7 (inlined Option::<u16>::is_none) { - scope 8 (inlined Option::<u16>::is_some) { + scope 8 (inlined Option::<u16>::is_none) { + scope 9 (inlined Option::<u16>::is_some) { } } - scope 9 (inlined core::num::<impl u16>::wrapping_add) { + scope 10 (inlined core::num::<impl u16>::wrapping_add) { } } @@ -39,29 +41,26 @@ fn step_forward(_1: u16, _2: usize) -> u16 { bb1: { _4 = copy _2 as u16 (IntToInt); StorageDead(_3); - StorageLive(_7); StorageLive(_6); StorageLive(_5); _5 = AddWithOverflow(copy _1, copy _4); _6 = copy (_5.1: bool); - _7 = unlikely(move _6) -> [return: bb2, unwind unreachable]; + switchInt(copy _6) -> [0: bb2, otherwise: bb3]; } bb2: { - switchInt(move _7) -> [0: bb3, otherwise: bb4]; - } - - bb3: { StorageDead(_5); StorageDead(_6); - StorageDead(_7); goto -> bb7; } + bb3: { + _7 = cold_path() -> [return: bb4, unwind unreachable]; + } + bb4: { StorageDead(_5); StorageDead(_6); - StorageDead(_7); goto -> bb6; } diff --git a/tests/mir-opt/pre-codegen/checked_ops.step_forward.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/checked_ops.step_forward.PreCodegen.after.panic-unwind.mir index bf1ffd1ef32..6e0242a220d 100644 --- a/tests/mir-opt/pre-codegen/checked_ops.step_forward.PreCodegen.after.panic-unwind.mir +++ b/tests/mir-opt/pre-codegen/checked_ops.step_forward.PreCodegen.after.panic-unwind.mir @@ -13,7 +13,9 @@ fn step_forward(_1: u16, _2: usize) -> u16 { scope 6 (inlined core::num::<impl u16>::checked_add) { let mut _5: (u16, bool); let mut _6: bool; - let mut _7: bool; + scope 7 (inlined unlikely) { + let _7: (); + } } } scope 5 (inlined convert::num::ptr_try_from_impls::<impl TryFrom<usize> for u16>::try_from) { @@ -21,11 +23,11 @@ fn step_forward(_1: u16, _2: usize) -> u16 { let mut _4: u16; } } - scope 7 (inlined Option::<u16>::is_none) { - scope 8 (inlined Option::<u16>::is_some) { + scope 8 (inlined Option::<u16>::is_none) { + scope 9 (inlined Option::<u16>::is_some) { } } - scope 9 (inlined core::num::<impl u16>::wrapping_add) { + scope 10 (inlined core::num::<impl u16>::wrapping_add) { } } @@ -39,29 +41,26 @@ fn step_forward(_1: u16, _2: usize) -> u16 { bb1: { _4 = copy _2 as u16 (IntToInt); StorageDead(_3); - StorageLive(_7); StorageLive(_6); StorageLive(_5); _5 = AddWithOverflow(copy _1, copy _4); _6 = copy (_5.1: bool); - _7 = unlikely(move _6) -> [return: bb2, unwind unreachable]; + switchInt(copy _6) -> [0: bb2, otherwise: bb3]; } bb2: { - switchInt(move _7) -> [0: bb3, otherwise: bb4]; - } - - bb3: { StorageDead(_5); StorageDead(_6); - StorageDead(_7); goto -> bb7; } + bb3: { + _7 = cold_path() -> [return: bb4, unwind unreachable]; + } + bb4: { StorageDead(_5); StorageDead(_6); - StorageDead(_7); goto -> bb6; } diff --git a/tests/run-make/mte-ffi/rmake.rs b/tests/run-make/mte-ffi/rmake.rs index f4fafb796e3..50f5f14191b 100644 --- a/tests/run-make/mte-ffi/rmake.rs +++ b/tests/run-make/mte-ffi/rmake.rs @@ -1,14 +1,12 @@ -// Tests that MTE tags and values stored in the top byte of a pointer (TBI) are -// preserved across FFI boundaries (C <-> Rust). -// This test does not require MTE: whilst the test will use MTE if available, if it is not, -// arbitrary tag bits are set using TBI. +//! Tests that MTE tags and values stored in the top byte of a pointer (TBI) are preserved across +//! FFI boundaries (C <-> Rust). This test does not require MTE: whilst the test will use MTE if +//! available, if it is not, arbitrary tag bits are set using TBI. -// This test is only valid for AArch64. -// The linker must be explicitly specified when cross-compiling, so it is limited to -// `aarch64-unknown-linux-gnu`. //@ only-aarch64-unknown-linux-gnu +// Reason: this test is only valid for AArch64 with `gcc`. The linker must be explicitly specified +// when cross-compiling, so it is limited to `aarch64-unknown-linux-gnu`. -use run_make_support::{cc, dynamic_lib_name, extra_c_flags, run, rustc, target}; +use run_make_support::{dynamic_lib_name, extra_c_flags, gcc, run, rustc, target}; fn main() { run_test("int"); @@ -29,7 +27,8 @@ fn run_test(variant: &str) { .target(target()) .linker("aarch64-linux-gnu-gcc") .run(); - cc().input(format!("bar_{variant}.c")) + gcc() + .input(format!("bar_{variant}.c")) .input(dynamic_lib_name("foo")) .out_exe("test") .args(&flags) diff --git a/tests/run-make/pointer-auth-link-with-c-lto-clang/rmake.rs b/tests/run-make/pointer-auth-link-with-c-lto-clang/rmake.rs index cf6e3d86377..0a2186b0953 100644 --- a/tests/run-make/pointer-auth-link-with-c-lto-clang/rmake.rs +++ b/tests/run-make/pointer-auth-link-with-c-lto-clang/rmake.rs @@ -10,14 +10,16 @@ //@ ignore-cross-compile // Reason: the compiled binary is executed -use run_make_support::{clang, env_var, llvm_ar, run, rustc, static_lib_name}; +use run_make_support::{clang, env_var, llvm_ar, llvm_objdump, run, rustc, static_lib_name}; + +static PAUTH_A_KEY_PATTERN: &'static str = "paciasp"; +static PAUTH_B_KEY_PATTERN: &'static str = "pacibsp"; fn main() { clang() .arg("-v") .lto("thin") - .arg("-mbranch-protection=bti+pac-ret+leaf") - .arg("-O2") + .arg("-mbranch-protection=bti+pac-ret+b-key+leaf") .arg("-c") .out_exe("test.o") .input("test.c") @@ -32,5 +34,15 @@ fn main() { .input("test.rs") .output("test.bin") .run(); + + // Check that both a-key and b-key pac-ret survived LTO + llvm_objdump() + .disassemble() + .input("test.bin") + .run() + .assert_stdout_contains_regex(PAUTH_A_KEY_PATTERN) + .assert_stdout_contains_regex(PAUTH_B_KEY_PATTERN); + + // Check that the binary actually runs run("test.bin"); } diff --git a/tests/run-make/simd-ffi/simd.rs b/tests/run-make/simd-ffi/simd.rs index b72078faafa..9ea8eb8cf88 100644 --- a/tests/run-make/simd-ffi/simd.rs +++ b/tests/run-make/simd-ffi/simd.rs @@ -25,7 +25,7 @@ pub struct i32x4([i32; 4]); extern "C" { // _mm_sll_epi32 - #[cfg(any(target_arch = "x86", target_arch = "x86-64"))] + #[cfg(all(any(target_arch = "x86", target_arch = "x86-64"), target_feature = "sse2"))] #[link_name = "llvm.x86.sse2.psll.d"] fn integer(a: i32x4, b: i32x4) -> i32x4; @@ -38,15 +38,13 @@ extern "C" { #[link_name = "llvm.aarch64.neon.maxs.v4i32"] fn integer(a: i32x4, b: i32x4) -> i32x4; - // just some substitute foreign symbol, not an LLVM intrinsic; so - // we still get type checking, but not as detailed as (ab)using - // LLVM. + // Use a generic LLVM intrinsic to do type checking on other platforms #[cfg(not(any( - target_arch = "x86", - target_arch = "x86-64", + all(any(target_arch = "x86", target_arch = "x86-64"), target_feature = "sse2"), target_arch = "arm", target_arch = "aarch64" )))] + #[link_name = "llvm.smax.v4i32"] fn integer(a: i32x4, b: i32x4) -> i32x4; } diff --git a/tests/run-make/unstable-feature-usage-metrics/lib.rs b/tests/run-make/unstable-feature-usage-metrics/lib.rs new file mode 100644 index 00000000000..2202d722c49 --- /dev/null +++ b/tests/run-make/unstable-feature-usage-metrics/lib.rs @@ -0,0 +1,9 @@ +#![feature(ascii_char)] // random lib feature +#![feature(box_patterns)] // random lang feature + +// picked arbitrary unstable features, just need a random lib and lang feature, ideally ones that +// won't be stabilized any time soon so we don't have to update this test + +fn main() { + println!("foobar"); +} diff --git a/tests/run-make/unstable-feature-usage-metrics/rmake.rs b/tests/run-make/unstable-feature-usage-metrics/rmake.rs new file mode 100644 index 00000000000..1397548a6fc --- /dev/null +++ b/tests/run-make/unstable-feature-usage-metrics/rmake.rs @@ -0,0 +1,87 @@ +//! This test checks if unstable feature usage metric dump files `unstable-feature-usage*.json` work +//! as expected. +//! +//! - Basic sanity checks on a default ICE dump. +//! +//! See <https://github.com/rust-lang/rust/issues/129485>. +//! +//! # Test history +//! +//! - forked from dump-ice-to-disk test, which has flakeyness issues on i686-mingw, I'm assuming +//! those will be present in this test as well on the same platform + +//@ ignore-windows +//FIXME(#128911): still flakey on i686-mingw. + +use std::path::{Path, PathBuf}; + +use run_make_support::rfs::create_dir_all; +use run_make_support::{ + cwd, filename_contains, has_extension, rfs, run_in_tmpdir, rustc, serde_json, + shallow_find_files, +}; + +fn find_feature_usage_metrics<P: AsRef<Path>>(dir: P) -> Vec<PathBuf> { + shallow_find_files(dir, |path| { + if filename_contains(path, "unstable_feature_usage") && has_extension(path, "json") { + true + } else { + dbg!(path); + false + } + }) +} + +fn main() { + test_metrics_dump(); + test_metrics_errors(); +} + +#[track_caller] +fn test_metrics_dump() { + run_in_tmpdir(|| { + let metrics_dir = cwd().join("metrics"); + create_dir_all(&metrics_dir); + rustc() + .input("lib.rs") + .env("RUST_BACKTRACE", "short") + .arg(format!("-Zmetrics-dir={}", metrics_dir.display())) + .run(); + let mut metrics = find_feature_usage_metrics(&metrics_dir); + let json_path = + metrics.pop().expect("there should be one metrics file in the output directory"); + + // After the `pop` above, there should be no files left. + assert!( + metrics.is_empty(), + "there should be no more than one metrics file in the output directory" + ); + + let message = rfs::read_to_string(json_path); + let parsed: serde_json::Value = + serde_json::from_str(&message).expect("metrics should be dumped as json"); + let expected = serde_json::json!( + { + "lib_features":[{"symbol":"ascii_char"}], + "lang_features":[{"symbol":"box_patterns","since":null}] + } + ); + + assert_eq!(expected, parsed); + }); +} + +#[track_caller] +fn test_metrics_errors() { + run_in_tmpdir(|| { + rustc() + .input("lib.rs") + .env("RUST_BACKTRACE", "short") + .arg("-Zmetrics-dir=invaliddirectorythatdefinitelydoesntexist") + .run_fail() + .assert_stderr_contains( + "error: cannot dump feature usage metrics: No such file or directory", + ) + .assert_stdout_not_contains("internal compiler error"); + }); +} diff --git a/tests/rustdoc-js-std/deduplication.js b/tests/rustdoc-js-std/deduplication.js index 51279dd5ed4..95049d0a174 100644 --- a/tests/rustdoc-js-std/deduplication.js +++ b/tests/rustdoc-js-std/deduplication.js @@ -5,6 +5,5 @@ const EXPECTED = { 'others': [ { 'path': 'std::f32', 'name': 'is_nan' }, { 'path': 'std::f64', 'name': 'is_nan' }, - { 'path': 'std::option::Option', 'name': 'is_none' }, ], }; diff --git a/tests/rustdoc-js-std/parser-errors.js b/tests/rustdoc-js-std/parser-errors.js index 068298e7236..8bffef61c8f 100644 --- a/tests/rustdoc-js-std/parser-errors.js +++ b/tests/rustdoc-js-std/parser-errors.js @@ -144,14 +144,6 @@ const PARSED = [ error: "Unexpected `:: ::`", }, { - query: "a::b::", - elems: [], - foundElems: 0, - userQuery: "a::b::", - returned: [], - error: "Paths cannot end with `::`", - }, - { query: ":a", elems: [], foundElems: 0, diff --git a/tests/rustdoc-js-std/path-end-empty.js b/tests/rustdoc-js-std/path-end-empty.js new file mode 100644 index 00000000000..6e853c61b4d --- /dev/null +++ b/tests/rustdoc-js-std/path-end-empty.js @@ -0,0 +1,6 @@ +const EXPECTED = { + 'query': 'Option::', + 'others': [ + { 'path': 'std::option::Option', 'name': 'get_or_insert_default' }, + ], +} diff --git a/tests/rustdoc-js-std/path-maxeditdistance.js b/tests/rustdoc-js-std/path-maxeditdistance.js index 632df658f75..af71713f055 100644 --- a/tests/rustdoc-js-std/path-maxeditdistance.js +++ b/tests/rustdoc-js-std/path-maxeditdistance.js @@ -3,16 +3,8 @@ const FILTER_CRATE = "std"; const EXPECTED = [ { query: 'vec::intoiterator', - others: [ - // trait std::iter::IntoIterator is not the first result - { 'path': 'std::vec', 'name': 'IntoIter' }, - { 'path': 'std::vec::Vec', 'name': 'into_iter' }, - { 'path': 'std::vec::Drain', 'name': 'into_iter' }, - { 'path': 'std::vec::IntoIter', 'name': 'into_iter' }, - { 'path': 'std::vec::ExtractIf', 'name': 'into_iter' }, - { 'path': 'std::vec::Splice', 'name': 'into_iter' }, - { 'path': 'std::collections::vec_deque::VecDeque', 'name': 'into_iter' }, - ], + // trait std::iter::IntoIterator is not the first result + others: [], }, { query: 'vec::iter', diff --git a/tests/rustdoc-js-std/write.js b/tests/rustdoc-js-std/write.js new file mode 100644 index 00000000000..4a9475102a5 --- /dev/null +++ b/tests/rustdoc-js-std/write.js @@ -0,0 +1,24 @@ +const EXPECTED = [ + { + 'query': 'write', + 'others': [ + { 'path': 'std::fmt', 'name': 'write' }, + { 'path': 'std::fs', 'name': 'write' }, + { 'path': 'std::ptr', 'name': 'write' }, + { 'path': 'std::fmt', 'name': 'Write' }, + { 'path': 'std::io', 'name': 'Write' }, + { 'path': 'std::hash::Hasher', 'name': 'write' }, + ], + }, + { + 'query': 'Write', + 'others': [ + { 'path': 'std::fmt', 'name': 'Write' }, + { 'path': 'std::io', 'name': 'Write' }, + { 'path': 'std::fmt', 'name': 'write' }, + { 'path': 'std::fs', 'name': 'write' }, + { 'path': 'std::ptr', 'name': 'write' }, + { 'path': 'std::hash::Hasher', 'name': 'write' }, + ], + }, +]; diff --git a/tests/rustdoc-js/case.js b/tests/rustdoc-js/case.js new file mode 100644 index 00000000000..22b970eb139 --- /dev/null +++ b/tests/rustdoc-js/case.js @@ -0,0 +1,17 @@ +const EXPECTED = [ + { + 'query': 'Foo', + 'others': [ + { 'path': 'case', 'name': 'Foo', 'desc': 'Docs for Foo' }, + { 'path': 'case', 'name': 'foo', 'desc': 'Docs for foo' }, + ], + }, + { + 'query': 'foo', + 'others': [ + // https://github.com/rust-lang/rust/issues/133017 + { 'path': 'case', 'name': 'Foo', 'desc': 'Docs for Foo' }, + { 'path': 'case', 'name': 'foo', 'desc': 'Docs for foo' }, + ], + }, +]; diff --git a/tests/rustdoc-js/case.rs b/tests/rustdoc-js/case.rs new file mode 100644 index 00000000000..532edd55f1d --- /dev/null +++ b/tests/rustdoc-js/case.rs @@ -0,0 +1,7 @@ +#![allow(nonstandard_style)] + +/// Docs for Foo +pub struct Foo; + +/// Docs for foo +pub struct foo; diff --git a/tests/rustdoc-js/non-english-identifier.js b/tests/rustdoc-js/non-english-identifier.js index 6a2c4cc637c..f2180b4c755 100644 --- a/tests/rustdoc-js/non-english-identifier.js +++ b/tests/rustdoc-js/non-english-identifier.js @@ -133,22 +133,34 @@ const EXPECTED = [ path: "non_english_identifier", href: "../non_english_identifier/trait.加法.html", desc: "Add" - }, + }], + in_args: [{ + name: "加上", + path: "non_english_identifier::加法", + href: "../non_english_identifier/trait.加法.html#tymethod.加上", + }], + returned: [], + }, + { // levensthein and substring checking only kick in at three characters + query: '加法宏', + others: [ { name: "中文名称的加法宏", path: "non_english_identifier", href: "../non_english_identifier/macro.中文名称的加法宏.html", - }, + }], + in_args: [], + returned: [], + }, + { // levensthein and substring checking only kick in at three characters + query: '加法A', + others: [ { name: "中文名称的加法API", path: "non_english_identifier", href: "../non_english_identifier/fn.中文名称的加法API.html", }], - in_args: [{ - name: "加上", - path: "non_english_identifier::加法", - href: "../non_english_identifier/trait.加法.html#tymethod.加上", - }], + in_args: [], returned: [], }, { // Extensive type-based search is still buggy, experimental & work-in-progress. diff --git a/tests/rustdoc-js/path-maxeditdistance.js b/tests/rustdoc-js/path-maxeditdistance.js index 73b24a6dddf..cf700193ac4 100644 --- a/tests/rustdoc-js/path-maxeditdistance.js +++ b/tests/rustdoc-js/path-maxeditdistance.js @@ -14,21 +14,38 @@ const EXPECTED = [ ], }, { - // swap br/rb; that's edit distance 2, where maxPathEditDistance = 3 (11 / 3) + // swap br/rb; that's edit distance 1, where maxPathEditDistance = 2 'query': 'arbacadarba::hocuspocusprestidigitation', 'others': [ { 'path': 'abracadabra', 'name': 'HocusPocusPrestidigitation' }, ], }, { - // truncate 5 chars, where maxEditDistance = 7 (21 / 3) - 'query': 'abracadarba::hocusprestidigitation', + // swap p/o o/p, that's also edit distance 1 + 'query': 'abracadabra::hocusopcusprestidigitation', 'others': [ { 'path': 'abracadabra', 'name': 'HocusPocusPrestidigitation' }, ], }, { - // truncate 9 chars, where maxEditDistance = 5 (17 / 3) + // swap p/o o/p and gi/ig, that's edit distance 2 + 'query': 'abracadabra::hocusopcusprestidiigtation', + 'others': [ + { 'path': 'abracadabra', 'name': 'HocusPocusPrestidigitation' }, + ], + }, + { + // swap p/o o/p, gi/ig, and ti/it, that's edit distance 3 and not shown (we stop at 2) + 'query': 'abracadabra::hocusopcusprestidiigtaiton', + 'others': [], + }, + { + // truncate 5 chars, where maxEditDistance = 2 + 'query': 'abracadarba::hocusprestidigitation', + 'others': [], + }, + { + // truncate 9 chars, where maxEditDistance = 2 'query': 'abracadarba::hprestidigitation', 'others': [], }, diff --git a/tests/rustdoc-js/prototype.js b/tests/rustdoc-js/prototype.js index da72fdce3db..0862acd8ffa 100644 --- a/tests/rustdoc-js/prototype.js +++ b/tests/rustdoc-js/prototype.js @@ -9,7 +9,9 @@ const EXPECTED = [ }, { 'query': '__proto__', - 'others': [], + 'others': [ + {"path": "", "name": "prototype"}, + ], 'returned': [], 'in_args': [], }, diff --git a/tests/rustdoc-js/trailing.js b/tests/rustdoc-js/trailing.js new file mode 100644 index 00000000000..df5dd22ca4e --- /dev/null +++ b/tests/rustdoc-js/trailing.js @@ -0,0 +1,7 @@ +// exact-check +const EXPECTED = { + 'query': 'inner::', + 'others': [ + { 'path': 'trailing::inner', 'name': 'function' }, + ], +} diff --git a/tests/rustdoc-js/trailing.rs b/tests/rustdoc-js/trailing.rs new file mode 100644 index 00000000000..5c7c9362ffb --- /dev/null +++ b/tests/rustdoc-js/trailing.rs @@ -0,0 +1,3 @@ +pub mod inner { + pub fn function() {} +} diff --git a/tests/rustdoc/footnote-reference-in-footnote-def.rs b/tests/rustdoc/footnote-reference-in-footnote-def.rs new file mode 100644 index 00000000000..db3f9a59ef8 --- /dev/null +++ b/tests/rustdoc/footnote-reference-in-footnote-def.rs @@ -0,0 +1,20 @@ +// Checks that footnote references in footnote definitions are correctly generated. +// Regression test for <https://github.com/rust-lang/rust/issues/131946>. + +#![crate_name = "foo"] + +//@ has 'foo/index.html' +//@ has - '//*[@class="docblock"]/p/sup[@id="fnref1"]/a[@href="#fn1"]' '1' +//@ has - '//li[@id="fn1"]/p' 'meow' +//@ has - '//li[@id="fn1"]/p/sup[@id="fnref2"]/a[@href="#fn2"]' '2' +//@ has - '//li[@id="fn1"]//a[@href="#fn2"]' '2' +//@ has - '//li[@id="fn2"]/p' 'uwu' +//@ has - '//li[@id="fn2"]/p/sup[@id="fnref1"]/a[@href="#fn1"]' '1' +//@ has - '//li[@id="fn2"]//a[@href="#fn1"]' '1' + +//! # footnote-hell +//! +//! Hello [^a]. +//! +//! [^a]: meow [^b] +//! [^b]: uwu [^a] diff --git a/tests/rustdoc/link-on-path-with-generics.rs b/tests/rustdoc/link-on-path-with-generics.rs new file mode 100644 index 00000000000..22ba36c9f15 --- /dev/null +++ b/tests/rustdoc/link-on-path-with-generics.rs @@ -0,0 +1,14 @@ +// This test ensures that paths with generics still get their link to their definition +// correctly generated. + +//@ compile-flags: -Zunstable-options --generate-link-to-definition +#![crate_name = "foo"] + +//@ has 'src/foo/link-on-path-with-generics.rs.html' + +pub struct Soyo<T>(T); +pub struct Saya; + +//@ has - '//pre[@class="rust"]//a[@href="#9"]' 'Soyo' +//@ has - '//pre[@class="rust"]//a[@href="#10"]' 'Saya' +pub fn bar<T>(s: Soyo<T>, x: Saya) {} diff --git a/tests/ui-fulldeps/stable-mir/check_intrinsics.rs b/tests/ui-fulldeps/stable-mir/check_intrinsics.rs index d7f37f36681..3534228f73e 100644 --- a/tests/ui-fulldeps/stable-mir/check_intrinsics.rs +++ b/tests/ui-fulldeps/stable-mir/check_intrinsics.rs @@ -64,7 +64,7 @@ fn check_instance(instance: &Instance) { if instance.has_body() { let Some(body) = instance.body() else { unreachable!("Expected a body") }; assert!(!body.blocks.is_empty()); - assert_eq!(&name, "likely"); + assert_eq!(&name, "select_unpredictable"); } else { assert!(instance.body().is_none()); assert_matches!(name.as_str(), "size_of_val" | "vtable_size"); @@ -78,7 +78,7 @@ fn check_def(fn_def: FnDef) { let name = intrinsic.fn_name(); match name.as_str() { - "likely" => { + "select_unpredictable" => { assert!(!intrinsic.must_be_overridden()); assert!(fn_def.has_body()); } @@ -132,7 +132,7 @@ fn generate_input(path: &str) -> std::io::Result<()> { pub fn use_intrinsics(init: bool) -> bool {{ let vtable_sz = unsafe {{ vtable_size(0 as *const ()) }}; let sz = unsafe {{ size_of_val("hi") }}; - likely(init && sz == 2) + select_unpredictable(init && sz == 2, false, true) }} "# )?; diff --git a/tests/ui/asan-odr-win/asan_odr_windows.rs b/tests/ui/asan-odr-win/asan_odr_windows.rs new file mode 100644 index 00000000000..c618ac02a66 --- /dev/null +++ b/tests/ui/asan-odr-win/asan_odr_windows.rs @@ -0,0 +1,18 @@ +//! Check that crates can be linked together with `-Z sanitizer=address` on msvc. +//! See <https://github.com/rust-lang/rust/issues/124390>. + +//@ run-pass +//@ compile-flags:-Zsanitizer=address +//@ aux-build: asan_odr_win-2.rs +//@ only-windows-msvc + +extern crate othercrate; + +fn main() { + let result = std::panic::catch_unwind(|| { + println!("hello!"); + }); + assert!(result.is_ok()); + + othercrate::exposed_func(); +} diff --git a/tests/ui/asan-odr-win/auxiliary/asan_odr_win-2.rs b/tests/ui/asan-odr-win/auxiliary/asan_odr_win-2.rs new file mode 100644 index 00000000000..75488a29e5e --- /dev/null +++ b/tests/ui/asan-odr-win/auxiliary/asan_odr_win-2.rs @@ -0,0 +1,11 @@ +//@ no-prefer-dynamic +//@ compile-flags: -Z sanitizer=address +#![crate_name = "othercrate"] +#![crate_type = "rlib"] + +pub fn exposed_func() { + let result = std::panic::catch_unwind(|| { + println!("hello!"); + }); + assert!(result.is_ok()); +} diff --git a/tests/ui/asm/x86_64/goto-block-safe.rs b/tests/ui/asm/x86_64/goto-block-safe.rs new file mode 100644 index 00000000000..ee833a48a4b --- /dev/null +++ b/tests/ui/asm/x86_64/goto-block-safe.rs @@ -0,0 +1,23 @@ +//@ only-x86_64 +//@ needs-asm-support + +#![deny(unreachable_code)] +#![feature(asm_goto)] + +use std::arch::asm; + +fn goto_fallthough() { + unsafe { + asm!( + "/* {} */", + label { + core::hint::unreachable_unchecked(); + //~^ ERROR [E0133] + } + ) + } +} + +fn main() { + goto_fallthough(); +} diff --git a/tests/ui/asm/x86_64/goto-block-safe.stderr b/tests/ui/asm/x86_64/goto-block-safe.stderr new file mode 100644 index 00000000000..49818db7484 --- /dev/null +++ b/tests/ui/asm/x86_64/goto-block-safe.stderr @@ -0,0 +1,14 @@ +error[E0133]: call to unsafe function `unreachable_unchecked` is unsafe and requires unsafe function or block + --> $DIR/goto-block-safe.rs:14:17 + | +LL | unsafe { + | ------ items do not inherit unsafety from separate enclosing items +... +LL | core::hint::unreachable_unchecked(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function + | + = note: consult the function's documentation for information on how to avoid undefined behavior + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0133`. diff --git a/tests/ui/auxiliary/pub-and-stability.rs b/tests/ui/auxiliary/pub-and-stability.rs index ee05a07dbb2..d2d07f99398 100644 --- a/tests/ui/auxiliary/pub-and-stability.rs +++ b/tests/ui/auxiliary/pub-and-stability.rs @@ -5,8 +5,8 @@ // The basic stability pattern in this file has four cases: // 1. no stability attribute at all // 2. a stable attribute (feature "unit_test") -// 3. an unstable attribute that unit test declares (feature "unstable_declared") -// 4. an unstable attribute that unit test fails to declare (feature "unstable_undeclared") +// 3. an unstable attribute that unit test enables (feature "unstable_declared") +// 4. an unstable attribute that unit test fails to enable (feature "unstable_undeclared") // // This file also covers four kinds of visibility: private, // pub(module), pub(crate), and pub. diff --git a/tests/ui/bootstrap/rustc_bootstap.force_stable.stderr b/tests/ui/bootstrap/rustc_bootstap.force_stable.stderr new file mode 100644 index 00000000000..f378f3c70dd --- /dev/null +++ b/tests/ui/bootstrap/rustc_bootstap.force_stable.stderr @@ -0,0 +1,10 @@ +error: the option `Z` is only accepted on the nightly compiler + +help: consider switching to a nightly toolchain: `rustup default nightly` + +note: selecting a toolchain with `+toolchain` arguments require a rustup proxy; see <https://rust-lang.github.io/rustup/concepts/index.html> + +note: for more information about Rust's stability policy, see <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html#unstable-features> + +error: 1 nightly option were parsed + diff --git a/tests/ui/bootstrap/rustc_bootstap.rs b/tests/ui/bootstrap/rustc_bootstap.rs new file mode 100644 index 00000000000..3d792ef4be4 --- /dev/null +++ b/tests/ui/bootstrap/rustc_bootstap.rs @@ -0,0 +1,47 @@ +//! Check `RUSTC_BOOTSTRAP`'s behavior in relation to feature stability and what rustc considers +//! itself to be (stable vs non-stable ). +//! +//! `RUSTC_BOOTSTRAP` accepts: +//! +//! - `1`: cheat, allow usage of unstable features even if rustc thinks it is a stable compiler. +//! - `x,y,z`: comma-delimited list of crates. +//! - `-1`: force rustc to think it is a stable compiler. + +// ignore-tidy-linelength + +//@ revisions: default_nightly cheat cheat_single_crate cheat_multi_crate force_stable invalid_zero invalid_junk +//@ only-nightly + +//@[default_nightly] unset-rustc-env:RUSTC_BOOTSTRAP +//@[default_nightly] check-pass + +// For a nightly compiler, this is same as `default_nightly` as if `RUSTC_BOOTSTRAP` was unset. +//@[invalid_zero] rustc-env:RUSTC_BOOTSTRAP=0 +//@[invalid_zero] check-pass + +// Invalid values are silently discarded, same as `default_nightly`, i.e. as if `RUSTC_BOOTSTRAP` +// was unset. +//@[invalid_junk] rustc-env:RUSTC_BOOTSTRAP=* +//@[invalid_junk] check-pass + +//@[cheat] rustc-env:RUSTC_BOOTSTRAP=1 +//@[cheat] check-pass + +//@[cheat_single_crate] rustc-env:RUSTC_BOOTSTRAP=x +//@[cheat_single_crate] check-pass + +//@[cheat_multi_crate] rustc-env:RUSTC_BOOTSTRAP=x,y,z +//@[cheat_multi_crate] check-pass + +// Note: compiletest passes some `-Z` flags to the compiler for ui testing purposes, so here we +// instead abuse the fact that `-Z unstable-options` is also part of rustc's stability story and is +// also affected by `RUSTC_BOOTSTRAP`. +//@[force_stable] rustc-env:RUSTC_BOOTSTRAP=-1 +//@[force_stable] compile-flags: -Z unstable-options +//@[force_stable] regex-error-pattern: error: the option `Z` is only accepted on the nightly compiler + +#![crate_type = "lib"] + +// Note: `rustc_attrs` is a perma-unstable internal feature that is unlikely to change, which is +// used as a proxy to check `RUSTC_BOOTSTRAP` versus stability checking logic. +#![feature(rustc_attrs)] diff --git a/tests/ui/check-cfg/auxiliary/cfg_macro.rs b/tests/ui/check-cfg/auxiliary/cfg_macro.rs new file mode 100644 index 00000000000..d68accd9202 --- /dev/null +++ b/tests/ui/check-cfg/auxiliary/cfg_macro.rs @@ -0,0 +1,11 @@ +// Inspired by https://github.com/rust-lang/cargo/issues/14775 + +pub fn my_lib_func() {} + +#[macro_export] +macro_rules! my_lib_macro { + () => { + #[cfg(my_lib_cfg)] + $crate::my_lib_func() + }; +} diff --git a/tests/ui/check-cfg/report-in-external-macros.rs b/tests/ui/check-cfg/report-in-external-macros.rs new file mode 100644 index 00000000000..56550b04af3 --- /dev/null +++ b/tests/ui/check-cfg/report-in-external-macros.rs @@ -0,0 +1,12 @@ +// This test checks that we emit the `unexpected_cfgs` lint even in code +// coming from an external macro. + +//@ check-pass +//@ no-auto-check-cfg +//@ aux-crate: cfg_macro=cfg_macro.rs +//@ compile-flags: --check-cfg=cfg() + +fn main() { + cfg_macro::my_lib_macro!(); + //~^ WARNING unexpected `cfg` condition name +} diff --git a/tests/ui/check-cfg/report-in-external-macros.stderr b/tests/ui/check-cfg/report-in-external-macros.stderr new file mode 100644 index 00000000000..11300a4e402 --- /dev/null +++ b/tests/ui/check-cfg/report-in-external-macros.stderr @@ -0,0 +1,14 @@ +warning: unexpected `cfg` condition name: `my_lib_cfg` + --> $DIR/report-in-external-macros.rs:10:5 + | +LL | cfg_macro::my_lib_macro!(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows` + = help: to expect this configuration use `--check-cfg=cfg(my_lib_cfg)` + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration + = note: `#[warn(unexpected_cfgs)]` on by default + = note: this warning originates in the macro `cfg_macro::my_lib_macro` (in Nightly builds, run with -Z macro-backtrace for more info) + +warning: 1 warning emitted + diff --git a/tests/ui/closures/2229_closure_analysis/bad-pattern.stderr b/tests/ui/closures/2229_closure_analysis/bad-pattern.stderr index ca8c2a16d32..5f980c46a1f 100644 --- a/tests/ui/closures/2229_closure_analysis/bad-pattern.stderr +++ b/tests/ui/closures/2229_closure_analysis/bad-pattern.stderr @@ -97,16 +97,19 @@ LL | if let Refutable::A = v3 { todo!() }; error[E0005]: refutable pattern in local binding --> $DIR/bad-pattern.rs:19:13 | +LL | const PAT: u32 = 0; + | -------------- missing patterns are not covered because `PAT` is interpreted as a constant pattern, not a new variable +... LL | let PAT = v1; - | ^^^ - | | - | pattern `1_u32..=u32::MAX` not covered - | missing patterns are not covered because `PAT` is interpreted as a constant pattern, not a new variable - | help: introduce a variable instead: `PAT_var` + | ^^^ pattern `1_u32..=u32::MAX` not covered | = 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: the matched value is of type `u32` +help: introduce a variable instead + | +LL | let PAT_var = v1; + | ~~~~~~~ error: aborting due to 7 previous errors diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.stderr index 347fa3fa892..4cfe51eccac 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.stderr @@ -11,10 +11,6 @@ note: closure cannot be moved more than once as it is not `Copy` due to moving t | LL | if let MultiVariant::Point(ref mut x, _) = point { | ^^^^^ -help: consider mutably borrowing `c` - | -LL | let a = &mut c; - | ++++ error: aborting due to 1 previous error diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.stderr index c9b27e76879..2ed611d6b52 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.stderr @@ -11,10 +11,6 @@ note: closure cannot be moved more than once as it is not `Copy` due to moving t | LL | let SingleVariant::Point(ref mut x, _) = point; | ^^^^^ -help: consider mutably borrowing `c` - | -LL | let b = &mut c; - | ++++ error: aborting due to 1 previous error diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.stderr index 079a9abedf9..47db2c76a2f 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.stderr @@ -11,10 +11,6 @@ note: closure cannot be moved more than once as it is not `Copy` due to moving t | LL | x.y.a += 1; | ^^^^^ -help: consider mutably borrowing `hello` - | -LL | let b = &mut hello; - | ++++ error: aborting due to 1 previous error diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.stderr index 0bf717404ce..9db64ec04b9 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.stderr @@ -11,10 +11,6 @@ note: closure cannot be moved more than once as it is not `Copy` due to moving t | LL | x.0 += 1; | ^^^ -help: consider mutably borrowing `hello` - | -LL | let b = &mut hello; - | ++++ error: aborting due to 1 previous error diff --git a/tests/ui/coercion/unboxing-needing-parenthases-issue-132924.rs b/tests/ui/coercion/unboxing-needing-parenthases-issue-132924.rs new file mode 100644 index 00000000000..fc4258fc0af --- /dev/null +++ b/tests/ui/coercion/unboxing-needing-parenthases-issue-132924.rs @@ -0,0 +1,18 @@ +//@ check-fail +fn main() { + let x = Box::new(Some(1)); + + let test: Option<i32> = x; + //~^ ERROR mismatched types + let x = Box::new(Some(1)); + let test: Option<i32> = { x as Box<Option<i32>> }; + //~^ ERROR mismatched types + + let x = Box::new(Some(1)); + let test: Option<i32> = if true { x as Box<Option<i32>> } else { None }; + //~^ ERROR mismatched types + + let x = std::rc::Rc::new(Some(1)); + let test: Option<i32> = x as std::rc::Rc<Option<i32>>; + //~^ ERROR mismatched types +} diff --git a/tests/ui/coercion/unboxing-needing-parenthases-issue-132924.stderr b/tests/ui/coercion/unboxing-needing-parenthases-issue-132924.stderr new file mode 100644 index 00000000000..429b1b87357 --- /dev/null +++ b/tests/ui/coercion/unboxing-needing-parenthases-issue-132924.stderr @@ -0,0 +1,59 @@ +error[E0308]: mismatched types + --> $DIR/unboxing-needing-parenthases-issue-132924.rs:5:29 + | +LL | let test: Option<i32> = x; + | ----------- ^ expected `Option<i32>`, found `Box<Option<{integer}>>` + | | + | expected due to this + | + = note: expected enum `Option<i32>` + found struct `Box<Option<{integer}>>` +help: consider unboxing the value + | +LL | let test: Option<i32> = *x; + | + + +error[E0308]: mismatched types + --> $DIR/unboxing-needing-parenthases-issue-132924.rs:8:31 + | +LL | let test: Option<i32> = { x as Box<Option<i32>> }; + | ^^^^^^^^^^^^^^^^^^^^^ expected `Option<i32>`, found `Box<Option<i32>>` + | + = note: expected enum `Option<_>` + found struct `Box<Option<_>>` +help: consider unboxing the value + | +LL | let test: Option<i32> = { *(x as Box<Option<i32>>) }; + | ++ + + +error[E0308]: mismatched types + --> $DIR/unboxing-needing-parenthases-issue-132924.rs:12:39 + | +LL | let test: Option<i32> = if true { x as Box<Option<i32>> } else { None }; + | ^^^^^^^^^^^^^^^^^^^^^ expected `Option<i32>`, found `Box<Option<i32>>` + | + = note: expected enum `Option<_>` + found struct `Box<Option<_>>` +help: consider unboxing the value + | +LL | let test: Option<i32> = if true { *(x as Box<Option<i32>>) } else { None }; + | ++ + + +error[E0308]: mismatched types + --> $DIR/unboxing-needing-parenthases-issue-132924.rs:16:29 + | +LL | let test: Option<i32> = x as std::rc::Rc<Option<i32>>; + | ----------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Option<i32>`, found `Rc<Option<i32>>` + | | + | expected due to this + | + = note: expected enum `Option<_>` + found struct `Rc<Option<_>>` +help: consider dereferencing the type + | +LL | let test: Option<i32> = *(x as std::rc::Rc<Option<i32>>); + | ++ + + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/const-generics/auxiliary/xcrate-const-ctor-a.rs b/tests/ui/const-generics/auxiliary/xcrate-const-ctor-a.rs new file mode 100644 index 00000000000..7ae5567bdc5 --- /dev/null +++ b/tests/ui/const-generics/auxiliary/xcrate-const-ctor-a.rs @@ -0,0 +1,6 @@ +#![feature(adt_const_params)] + +use std::marker::ConstParamTy; + +#[derive(Eq, PartialEq, ConstParamTy)] +pub struct Foo; diff --git a/tests/ui/const-generics/using-static-as-const-arg.rs b/tests/ui/const-generics/using-static-as-const-arg.rs new file mode 100644 index 00000000000..2e8a2a14484 --- /dev/null +++ b/tests/ui/const-generics/using-static-as-const-arg.rs @@ -0,0 +1,7 @@ +//@ check-pass + +pub static STATIC: u32 = 0; +pub struct Foo<const N: u32>; +pub const FOO: Foo<{STATIC}> = Foo; + +fn main() {} diff --git a/tests/ui/const-generics/xcrate-const-ctor-b.rs b/tests/ui/const-generics/xcrate-const-ctor-b.rs new file mode 100644 index 00000000000..dce2e43b316 --- /dev/null +++ b/tests/ui/const-generics/xcrate-const-ctor-b.rs @@ -0,0 +1,15 @@ +//@ check-pass +//@ aux-build:xcrate-const-ctor-a.rs + +#![feature(adt_const_params)] + +extern crate xcrate_const_ctor_a; +use xcrate_const_ctor_a::Foo; + +fn bar<const N: Foo>() {} + +fn baz() { + bar::<{ Foo }>(); +} + +fn main() {} diff --git a/tests/ui/consts/const-pattern-irrefutable.rs b/tests/ui/consts/const-pattern-irrefutable.rs index 61bdf57ffdb..759d2e8b2ed 100644 --- a/tests/ui/consts/const-pattern-irrefutable.rs +++ b/tests/ui/consts/const-pattern-irrefutable.rs @@ -1,28 +1,43 @@ mod foo { pub const b: u8 = 2; - pub const d: u8 = 2; + //~^ missing patterns are not covered because `b` is interpreted as a constant pattern, not a new variable + pub const d: (u8, u8) = (2, 1); + //~^ missing patterns are not covered because `d` is interpreted as a constant pattern, not a new variable } use foo::b as c; use foo::d; const a: u8 = 2; +//~^ missing patterns are not covered because `a` is interpreted as a constant pattern, not a new variable + +#[derive(PartialEq)] +struct S { + foo: u8, +} + +const e: S = S { + foo: 0, +}; fn main() { let a = 4; //~^ ERROR refutable pattern in local binding //~| patterns `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered - //~| missing patterns are not covered because `a` is interpreted as a constant pattern, not a new variable //~| HELP introduce a variable instead let c = 4; //~^ ERROR refutable pattern in local binding //~| patterns `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered - //~| missing patterns are not covered because `c` is interpreted as a constant pattern, not a new variable //~| HELP introduce a variable instead - let d = 4; + let d = (4, 4); //~^ ERROR refutable pattern in local binding - //~| patterns `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered - //~| missing patterns are not covered because `d` is interpreted as a constant pattern, not a new variable + //~| patterns `(0_u8..=1_u8, _)` and `(3_u8..=u8::MAX, _)` not covered + //~| HELP introduce a variable instead + let e = S { + //~^ ERROR refutable pattern in local binding + //~| pattern `S { foo: 1_u8..=u8::MAX }` not covered //~| HELP introduce a variable instead + foo: 1, + }; fn f() {} // Check that the `NOTE`s still work with an item here (cf. issue #35115). } diff --git a/tests/ui/consts/const-pattern-irrefutable.stderr b/tests/ui/consts/const-pattern-irrefutable.stderr index 2aed68bdd64..afb67a3a118 100644 --- a/tests/ui/consts/const-pattern-irrefutable.stderr +++ b/tests/ui/consts/const-pattern-irrefutable.stderr @@ -1,45 +1,76 @@ error[E0005]: refutable pattern in local binding - --> $DIR/const-pattern-irrefutable.rs:12:9 + --> $DIR/const-pattern-irrefutable.rs:24:9 | +LL | const a: u8 = 2; + | ----------- missing patterns are not covered because `a` is interpreted as a constant pattern, not a new variable +... LL | let a = 4; - | ^ - | | - | patterns `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered - | missing patterns are not covered because `a` is interpreted as a constant pattern, not a new variable - | help: introduce a variable instead: `a_var` + | ^ patterns `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered | = 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: the matched value is of type `u8` +help: introduce a variable instead + | +LL | let a_var = 4; + | ~~~~~ error[E0005]: refutable pattern in local binding - --> $DIR/const-pattern-irrefutable.rs:17:9 + --> $DIR/const-pattern-irrefutable.rs:28:9 | +LL | pub const b: u8 = 2; + | --------------- missing patterns are not covered because `b` is interpreted as a constant pattern, not a new variable +... LL | let c = 4; - | ^ - | | - | patterns `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered - | missing patterns are not covered because `c` is interpreted as a constant pattern, not a new variable - | help: introduce a variable instead: `c_var` + | ^ patterns `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered | = 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: the matched value is of type `u8` +help: introduce a variable instead + | +LL | let b_var = 4; + | ~~~~~ error[E0005]: refutable pattern in local binding - --> $DIR/const-pattern-irrefutable.rs:22:9 + --> $DIR/const-pattern-irrefutable.rs:32:9 | -LL | let d = 4; - | ^ - | | - | patterns `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered - | missing patterns are not covered because `d` is interpreted as a constant pattern, not a new variable - | help: introduce a variable instead: `d_var` +LL | pub const d: (u8, u8) = (2, 1); + | --------------------- missing patterns are not covered because `d` is interpreted as a constant pattern, not a new variable +... +LL | let d = (4, 4); + | ^ patterns `(0_u8..=1_u8, _)` and `(3_u8..=u8::MAX, _)` not covered | = 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: the matched value is of type `u8` + = note: the matched value is of type `(u8, u8)` +help: introduce a variable instead + | +LL | let d_var = (4, 4); + | ~~~~~ + +error[E0005]: refutable pattern in local binding + --> $DIR/const-pattern-irrefutable.rs:36:9 + | +LL | const e: S = S { + | ---------- missing patterns are not covered because `e` is interpreted as a constant pattern, not a new variable +... +LL | let e = S { + | ^ pattern `S { foo: 1_u8..=u8::MAX }` not covered + | + = 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: `S` defined here + --> $DIR/const-pattern-irrefutable.rs:15:8 + | +LL | struct S { + | ^ + = note: the matched value is of type `S` +help: introduce a variable instead + | +LL | let e_var = S { + | ~~~~~ -error: aborting due to 3 previous errors +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0005`. diff --git a/tests/ui/consts/const-ptr-is-null.rs b/tests/ui/consts/const-ptr-is-null.rs index 82c293c0ad6..92cf87a9782 100644 --- a/tests/ui/consts/const-ptr-is-null.rs +++ b/tests/ui/consts/const-ptr-is-null.rs @@ -1,4 +1,3 @@ -#![feature(const_ptr_is_null)] use std::ptr; const IS_NULL: () = { diff --git a/tests/ui/consts/const-ptr-is-null.stderr b/tests/ui/consts/const-ptr-is-null.stderr index 5fd35142818..f71b3752772 100644 --- a/tests/ui/consts/const-ptr-is-null.stderr +++ b/tests/ui/consts/const-ptr-is-null.stderr @@ -8,7 +8,7 @@ note: inside `std::ptr::const_ptr::<impl *const T>::is_null::compiletime` note: inside `std::ptr::const_ptr::<impl *const i32>::is_null` --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL note: inside `MAYBE_NULL` - --> $DIR/const-ptr-is-null.rs:17:14 + --> $DIR/const-ptr-is-null.rs:16:14 | LL | assert!(!ptr.wrapping_sub(512).is_null()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/consts/const-unstable-intrinsic.stderr b/tests/ui/consts/const-unstable-intrinsic.stderr index 8b61b0904a9..dfca04bef07 100644 --- a/tests/ui/consts/const-unstable-intrinsic.stderr +++ b/tests/ui/consts/const-unstable-intrinsic.stderr @@ -74,7 +74,7 @@ error: intrinsic `copy::copy` cannot be (indirectly) exposed to stable LL | unsafe { copy(src, dst, count) } | ^^^^^^^^^^^^^^^^^^^^^ | - = help: mark the caller as `#[rustc_const_unstable]`, or mark the intrinsic `#[rustc_const_stable_intrinsic]` (but this requires team approval) + = help: mark the caller as `#[rustc_const_unstable]`, or mark the intrinsic `#[rustc_intrinsic_const_stable_indirect]` (but this requires team approval) error: const function that might be (indirectly) exposed to stable cannot use `#[feature(local)]` --> $DIR/const-unstable-intrinsic.rs:61:9 diff --git a/tests/ui/consts/const_in_pattern/incomplete-slice.stderr b/tests/ui/consts/const_in_pattern/incomplete-slice.stderr index bd61f43727b..c73d1f05900 100644 --- a/tests/ui/consts/const_in_pattern/incomplete-slice.stderr +++ b/tests/ui/consts/const_in_pattern/incomplete-slice.stderr @@ -3,8 +3,20 @@ error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered | LL | match &[][..] { | ^^^^^^^ patterns `&[]` and `&[_, _, ..]` not covered +LL | +LL | E_SL => {} + | ---- this pattern doesn't introduce a new catch-all binding, but rather pattern matches against the value of constant `E_SL` | = note: the matched value is of type `&[E]` +note: constant `E_SL` defined here + --> $DIR/incomplete-slice.rs:6:1 + | +LL | const E_SL: &[E] = &[E::A]; + | ^^^^^^^^^^^^^^^^ +help: if you meant to introduce a binding, use a different name + | +LL | E_SL_var => {} + | ++++ help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms | LL ~ E_SL => {}, diff --git a/tests/ui/consts/is_val_statically_known.rs b/tests/ui/consts/is_val_statically_known.rs index a9059817bcc..d55910d32d3 100644 --- a/tests/ui/consts/is_val_statically_known.rs +++ b/tests/ui/consts/is_val_statically_known.rs @@ -1,6 +1,6 @@ //@ run-pass -#![feature(core_intrinsics, is_val_statically_known)] +#![feature(core_intrinsics)] use std::intrinsics::is_val_statically_known; diff --git a/tests/ui/consts/min_const_fn/recursive_const_stab_unstable_if_unmarked.rs b/tests/ui/consts/min_const_fn/recursive_const_stab_unstable_if_unmarked.rs index 51811b14203..429fa060521 100644 --- a/tests/ui/consts/min_const_fn/recursive_const_stab_unstable_if_unmarked.rs +++ b/tests/ui/consts/min_const_fn/recursive_const_stab_unstable_if_unmarked.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Zforce-unstable-if-unmarked //@ edition: 2021 -#![feature(const_async_blocks, rustc_attrs, rustc_private)] +#![feature(const_async_blocks, rustc_attrs)] pub const fn not_stably_const() { // We need to do something const-unstable here. diff --git a/tests/ui/consts/promoted_running_out_of_memory_issue-130687.rs b/tests/ui/consts/promoted_running_out_of_memory_issue-130687.rs new file mode 100644 index 00000000000..b923a768cbf --- /dev/null +++ b/tests/ui/consts/promoted_running_out_of_memory_issue-130687.rs @@ -0,0 +1,12 @@ +//! Ensure we do not ICE when a promoted fails to evaluate due to running out of memory. +//! Also see <https://github.com/rust-lang/rust/issues/130687>. + +// Needs the max type size to be much bigger than the RAM people typically have. +//@ only-64bit + +pub struct Data([u8; (1 << 47) - 1]); +const _: &'static Data = &Data([0; (1 << 47) - 1]); +//~^ERROR: evaluation of constant value failed +//~| tried to allocate more memory than available to compiler + +fn main() {} diff --git a/tests/ui/consts/promoted_running_out_of_memory_issue-130687.stderr b/tests/ui/consts/promoted_running_out_of_memory_issue-130687.stderr new file mode 100644 index 00000000000..50e920f05f9 --- /dev/null +++ b/tests/ui/consts/promoted_running_out_of_memory_issue-130687.stderr @@ -0,0 +1,15 @@ +error[E0080]: evaluation of constant value failed + --> $DIR/promoted_running_out_of_memory_issue-130687.rs:8:32 + | +LL | const _: &'static Data = &Data([0; (1 << 47) - 1]); + | ^^^^^^^^^^^^^^^^^^ tried to allocate more memory than available to compiler + +note: erroneous constant encountered + --> $DIR/promoted_running_out_of_memory_issue-130687.rs:8:26 + | +LL | const _: &'static Data = &Data([0; (1 << 47) - 1]); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/consts/ptr_is_null.rs b/tests/ui/consts/ptr_is_null.rs index bbf13802312..8b41f5718e8 100644 --- a/tests/ui/consts/ptr_is_null.rs +++ b/tests/ui/consts/ptr_is_null.rs @@ -1,7 +1,6 @@ //@ compile-flags: --crate-type=lib //@ check-pass -#![feature(const_ptr_is_null)] #![allow(useless_ptr_null_checks)] const FOO: &usize = &42; diff --git a/tests/ui/debuginfo/debuginfo-inline-callsite-location-macro-1.rs b/tests/ui/debuginfo/debuginfo-inline-callsite-location-macro-1.rs new file mode 100644 index 00000000000..32ef849f47e --- /dev/null +++ b/tests/ui/debuginfo/debuginfo-inline-callsite-location-macro-1.rs @@ -0,0 +1,4124 @@ +//@ check-pass +//@ compile-flags: -Cdebuginfo=2 -Copt-level=0 -Zmir-enable-passes=+Inline +//@ ignore-msvc +// ignore-tidy-filelength + +#[derive(Default)] +struct Something {} + +#[collapse_debuginfo(yes)] +macro_rules! collapsed_macro { + ($code:expr) => { + // Important to use a function here, so it can be inlined + // at the MIR stage. + Something::default() + } +} + +fn collapsed_debuginfo() { + // LLVM allows 12 bits for encoding discriminators, so 4096+1 calls to a + // MIR-inlined function will exhaust it. But because we're using + // collapse_debuginfo(yes) for this macro, we shouldn't need discriminators + // at all. + collapsed_macro!(1); + collapsed_macro!(2); + collapsed_macro!(3); + collapsed_macro!(4); + collapsed_macro!(5); + collapsed_macro!(6); + collapsed_macro!(7); + collapsed_macro!(8); + collapsed_macro!(9); + collapsed_macro!(10); + collapsed_macro!(11); + collapsed_macro!(12); + collapsed_macro!(13); + collapsed_macro!(14); + collapsed_macro!(15); + collapsed_macro!(16); + collapsed_macro!(17); + collapsed_macro!(18); + collapsed_macro!(19); + collapsed_macro!(20); + collapsed_macro!(21); + collapsed_macro!(22); + collapsed_macro!(23); + collapsed_macro!(24); + collapsed_macro!(25); + collapsed_macro!(26); + collapsed_macro!(27); + collapsed_macro!(28); + collapsed_macro!(29); + collapsed_macro!(30); + collapsed_macro!(31); + collapsed_macro!(32); + collapsed_macro!(33); + collapsed_macro!(34); + collapsed_macro!(35); + collapsed_macro!(36); + collapsed_macro!(37); + collapsed_macro!(38); + collapsed_macro!(39); + collapsed_macro!(40); + collapsed_macro!(41); + collapsed_macro!(42); + collapsed_macro!(43); + collapsed_macro!(44); + collapsed_macro!(45); + collapsed_macro!(46); + collapsed_macro!(47); + collapsed_macro!(48); + collapsed_macro!(49); + collapsed_macro!(50); + collapsed_macro!(51); + collapsed_macro!(52); + collapsed_macro!(53); + collapsed_macro!(54); + collapsed_macro!(55); + collapsed_macro!(56); + collapsed_macro!(57); + collapsed_macro!(58); + collapsed_macro!(59); + collapsed_macro!(60); + collapsed_macro!(61); + collapsed_macro!(62); + collapsed_macro!(63); + collapsed_macro!(64); + collapsed_macro!(65); + collapsed_macro!(66); + collapsed_macro!(67); + collapsed_macro!(68); + collapsed_macro!(69); + collapsed_macro!(70); + collapsed_macro!(71); + collapsed_macro!(72); + collapsed_macro!(73); + collapsed_macro!(74); + collapsed_macro!(75); + collapsed_macro!(76); + collapsed_macro!(77); + collapsed_macro!(78); + collapsed_macro!(79); + collapsed_macro!(80); + collapsed_macro!(81); + collapsed_macro!(82); + collapsed_macro!(83); + collapsed_macro!(84); + collapsed_macro!(85); + collapsed_macro!(86); + collapsed_macro!(87); + collapsed_macro!(88); + collapsed_macro!(89); + collapsed_macro!(90); + collapsed_macro!(91); + collapsed_macro!(92); + collapsed_macro!(93); + collapsed_macro!(94); + collapsed_macro!(95); + collapsed_macro!(96); + collapsed_macro!(97); + collapsed_macro!(98); + collapsed_macro!(99); + collapsed_macro!(100); + collapsed_macro!(101); + collapsed_macro!(102); + collapsed_macro!(103); + collapsed_macro!(104); + collapsed_macro!(105); + collapsed_macro!(106); + collapsed_macro!(107); + collapsed_macro!(108); + collapsed_macro!(109); + collapsed_macro!(110); + collapsed_macro!(111); + collapsed_macro!(112); + collapsed_macro!(113); + collapsed_macro!(114); + collapsed_macro!(115); + collapsed_macro!(116); + collapsed_macro!(117); + collapsed_macro!(118); + collapsed_macro!(119); + collapsed_macro!(120); + collapsed_macro!(121); + collapsed_macro!(122); + collapsed_macro!(123); + collapsed_macro!(124); + collapsed_macro!(125); + collapsed_macro!(126); + collapsed_macro!(127); + collapsed_macro!(128); + collapsed_macro!(129); + collapsed_macro!(130); + collapsed_macro!(131); + collapsed_macro!(132); + collapsed_macro!(133); + collapsed_macro!(134); + collapsed_macro!(135); + collapsed_macro!(136); + collapsed_macro!(137); + collapsed_macro!(138); + collapsed_macro!(139); + collapsed_macro!(140); + collapsed_macro!(141); + collapsed_macro!(142); + collapsed_macro!(143); + collapsed_macro!(144); + collapsed_macro!(145); + collapsed_macro!(146); + collapsed_macro!(147); + collapsed_macro!(148); + collapsed_macro!(149); + collapsed_macro!(150); + collapsed_macro!(151); + collapsed_macro!(152); + collapsed_macro!(153); + collapsed_macro!(154); + collapsed_macro!(155); + collapsed_macro!(156); + collapsed_macro!(157); + collapsed_macro!(158); + collapsed_macro!(159); + collapsed_macro!(160); + collapsed_macro!(161); + collapsed_macro!(162); + collapsed_macro!(163); + collapsed_macro!(164); + collapsed_macro!(165); + collapsed_macro!(166); + collapsed_macro!(167); + collapsed_macro!(168); + collapsed_macro!(169); + collapsed_macro!(170); + collapsed_macro!(171); + collapsed_macro!(172); + collapsed_macro!(173); + collapsed_macro!(174); + collapsed_macro!(175); + collapsed_macro!(176); + collapsed_macro!(177); + collapsed_macro!(178); + collapsed_macro!(179); + collapsed_macro!(180); + collapsed_macro!(181); + collapsed_macro!(182); + collapsed_macro!(183); + collapsed_macro!(184); + collapsed_macro!(185); + collapsed_macro!(186); + collapsed_macro!(187); + collapsed_macro!(188); + collapsed_macro!(189); + collapsed_macro!(190); + collapsed_macro!(191); + collapsed_macro!(192); + collapsed_macro!(193); + collapsed_macro!(194); + collapsed_macro!(195); + collapsed_macro!(196); + collapsed_macro!(197); + collapsed_macro!(198); + collapsed_macro!(199); + collapsed_macro!(200); + collapsed_macro!(201); + collapsed_macro!(202); + collapsed_macro!(203); + collapsed_macro!(204); + collapsed_macro!(205); + collapsed_macro!(206); + collapsed_macro!(207); + collapsed_macro!(208); + collapsed_macro!(209); + collapsed_macro!(210); + collapsed_macro!(211); + collapsed_macro!(212); + collapsed_macro!(213); + collapsed_macro!(214); + collapsed_macro!(215); + collapsed_macro!(216); + collapsed_macro!(217); + collapsed_macro!(218); + collapsed_macro!(219); + collapsed_macro!(220); + collapsed_macro!(221); + collapsed_macro!(222); + collapsed_macro!(223); + collapsed_macro!(224); + collapsed_macro!(225); + collapsed_macro!(226); + collapsed_macro!(227); + collapsed_macro!(228); + collapsed_macro!(229); + collapsed_macro!(230); + collapsed_macro!(231); + collapsed_macro!(232); + collapsed_macro!(233); + collapsed_macro!(234); + collapsed_macro!(235); + collapsed_macro!(236); + collapsed_macro!(237); + collapsed_macro!(238); + collapsed_macro!(239); + collapsed_macro!(240); + collapsed_macro!(241); + collapsed_macro!(242); + collapsed_macro!(243); + collapsed_macro!(244); + collapsed_macro!(245); + collapsed_macro!(246); + collapsed_macro!(247); + collapsed_macro!(248); + collapsed_macro!(249); + collapsed_macro!(250); + collapsed_macro!(251); + collapsed_macro!(252); + collapsed_macro!(253); + collapsed_macro!(254); + collapsed_macro!(255); + collapsed_macro!(256); + collapsed_macro!(257); + collapsed_macro!(258); + collapsed_macro!(259); + collapsed_macro!(260); + collapsed_macro!(261); + collapsed_macro!(262); + collapsed_macro!(263); + collapsed_macro!(264); + collapsed_macro!(265); + collapsed_macro!(266); + collapsed_macro!(267); + collapsed_macro!(268); + collapsed_macro!(269); + collapsed_macro!(270); + collapsed_macro!(271); + collapsed_macro!(272); + collapsed_macro!(273); + collapsed_macro!(274); + collapsed_macro!(275); + collapsed_macro!(276); + collapsed_macro!(277); + collapsed_macro!(278); + collapsed_macro!(279); + collapsed_macro!(280); + collapsed_macro!(281); + collapsed_macro!(282); + collapsed_macro!(283); + collapsed_macro!(284); + collapsed_macro!(285); + collapsed_macro!(286); + collapsed_macro!(287); + collapsed_macro!(288); + collapsed_macro!(289); + collapsed_macro!(290); + collapsed_macro!(291); + collapsed_macro!(292); + collapsed_macro!(293); + collapsed_macro!(294); + collapsed_macro!(295); + collapsed_macro!(296); + collapsed_macro!(297); + collapsed_macro!(298); + collapsed_macro!(299); + collapsed_macro!(300); + collapsed_macro!(301); + collapsed_macro!(302); + collapsed_macro!(303); + collapsed_macro!(304); + collapsed_macro!(305); + collapsed_macro!(306); + collapsed_macro!(307); + collapsed_macro!(308); + collapsed_macro!(309); + collapsed_macro!(310); + collapsed_macro!(311); + collapsed_macro!(312); + collapsed_macro!(313); + collapsed_macro!(314); + collapsed_macro!(315); + collapsed_macro!(316); + collapsed_macro!(317); + collapsed_macro!(318); + collapsed_macro!(319); + collapsed_macro!(320); + collapsed_macro!(321); + collapsed_macro!(322); + collapsed_macro!(323); + collapsed_macro!(324); + collapsed_macro!(325); + collapsed_macro!(326); + collapsed_macro!(327); + collapsed_macro!(328); + collapsed_macro!(329); + collapsed_macro!(330); + collapsed_macro!(331); + collapsed_macro!(332); + collapsed_macro!(333); + collapsed_macro!(334); + collapsed_macro!(335); + collapsed_macro!(336); + collapsed_macro!(337); + collapsed_macro!(338); + collapsed_macro!(339); + collapsed_macro!(340); + collapsed_macro!(341); + collapsed_macro!(342); + collapsed_macro!(343); + collapsed_macro!(344); + collapsed_macro!(345); + collapsed_macro!(346); + collapsed_macro!(347); + collapsed_macro!(348); + collapsed_macro!(349); + collapsed_macro!(350); + collapsed_macro!(351); + collapsed_macro!(352); + collapsed_macro!(353); + collapsed_macro!(354); + collapsed_macro!(355); + collapsed_macro!(356); + collapsed_macro!(357); + collapsed_macro!(358); + collapsed_macro!(359); + collapsed_macro!(360); + collapsed_macro!(361); + collapsed_macro!(362); + collapsed_macro!(363); + collapsed_macro!(364); + collapsed_macro!(365); + collapsed_macro!(366); + collapsed_macro!(367); + collapsed_macro!(368); + collapsed_macro!(369); + collapsed_macro!(370); + collapsed_macro!(371); + collapsed_macro!(372); + collapsed_macro!(373); + collapsed_macro!(374); + collapsed_macro!(375); + collapsed_macro!(376); + collapsed_macro!(377); + collapsed_macro!(378); + collapsed_macro!(379); + collapsed_macro!(380); + collapsed_macro!(381); + collapsed_macro!(382); + collapsed_macro!(383); + collapsed_macro!(384); + collapsed_macro!(385); + collapsed_macro!(386); + collapsed_macro!(387); + collapsed_macro!(388); + collapsed_macro!(389); + collapsed_macro!(390); + collapsed_macro!(391); + collapsed_macro!(392); + collapsed_macro!(393); + collapsed_macro!(394); + collapsed_macro!(395); + collapsed_macro!(396); + collapsed_macro!(397); + collapsed_macro!(398); + collapsed_macro!(399); + collapsed_macro!(400); + collapsed_macro!(401); + collapsed_macro!(402); + collapsed_macro!(403); + collapsed_macro!(404); + collapsed_macro!(405); + collapsed_macro!(406); + collapsed_macro!(407); + collapsed_macro!(408); + collapsed_macro!(409); + collapsed_macro!(410); + collapsed_macro!(411); + collapsed_macro!(412); + collapsed_macro!(413); + collapsed_macro!(414); + collapsed_macro!(415); + collapsed_macro!(416); + collapsed_macro!(417); + collapsed_macro!(418); + collapsed_macro!(419); + collapsed_macro!(420); + collapsed_macro!(421); + collapsed_macro!(422); + collapsed_macro!(423); + collapsed_macro!(424); + collapsed_macro!(425); + collapsed_macro!(426); + collapsed_macro!(427); + collapsed_macro!(428); + collapsed_macro!(429); + collapsed_macro!(430); + collapsed_macro!(431); + collapsed_macro!(432); + collapsed_macro!(433); + collapsed_macro!(434); + collapsed_macro!(435); + collapsed_macro!(436); + collapsed_macro!(437); + collapsed_macro!(438); + collapsed_macro!(439); + collapsed_macro!(440); + collapsed_macro!(441); + collapsed_macro!(442); + collapsed_macro!(443); + collapsed_macro!(444); + collapsed_macro!(445); + collapsed_macro!(446); + collapsed_macro!(447); + collapsed_macro!(448); + collapsed_macro!(449); + collapsed_macro!(450); + collapsed_macro!(451); + collapsed_macro!(452); + collapsed_macro!(453); + collapsed_macro!(454); + collapsed_macro!(455); + collapsed_macro!(456); + collapsed_macro!(457); + collapsed_macro!(458); + collapsed_macro!(459); + collapsed_macro!(460); + collapsed_macro!(461); + collapsed_macro!(462); + collapsed_macro!(463); + collapsed_macro!(464); + collapsed_macro!(465); + collapsed_macro!(466); + collapsed_macro!(467); + collapsed_macro!(468); + collapsed_macro!(469); + collapsed_macro!(470); + collapsed_macro!(471); + collapsed_macro!(472); + collapsed_macro!(473); + collapsed_macro!(474); + collapsed_macro!(475); + collapsed_macro!(476); + collapsed_macro!(477); + collapsed_macro!(478); + collapsed_macro!(479); + collapsed_macro!(480); + collapsed_macro!(481); + collapsed_macro!(482); + collapsed_macro!(483); + collapsed_macro!(484); + collapsed_macro!(485); + collapsed_macro!(486); + collapsed_macro!(487); + collapsed_macro!(488); + collapsed_macro!(489); + collapsed_macro!(490); + collapsed_macro!(491); + collapsed_macro!(492); + collapsed_macro!(493); + collapsed_macro!(494); + collapsed_macro!(495); + collapsed_macro!(496); + collapsed_macro!(497); + collapsed_macro!(498); + collapsed_macro!(499); + collapsed_macro!(500); + collapsed_macro!(501); + collapsed_macro!(502); + collapsed_macro!(503); + collapsed_macro!(504); + collapsed_macro!(505); + collapsed_macro!(506); + collapsed_macro!(507); + collapsed_macro!(508); + collapsed_macro!(509); + collapsed_macro!(510); + collapsed_macro!(511); + collapsed_macro!(512); + collapsed_macro!(513); + collapsed_macro!(514); + collapsed_macro!(515); + collapsed_macro!(516); + collapsed_macro!(517); + collapsed_macro!(518); + collapsed_macro!(519); + collapsed_macro!(520); + collapsed_macro!(521); + collapsed_macro!(522); + collapsed_macro!(523); + collapsed_macro!(524); + collapsed_macro!(525); + collapsed_macro!(526); + collapsed_macro!(527); + collapsed_macro!(528); + collapsed_macro!(529); + collapsed_macro!(530); + collapsed_macro!(531); + collapsed_macro!(532); + collapsed_macro!(533); + collapsed_macro!(534); + collapsed_macro!(535); + collapsed_macro!(536); + collapsed_macro!(537); + collapsed_macro!(538); + collapsed_macro!(539); + collapsed_macro!(540); + collapsed_macro!(541); + collapsed_macro!(542); + collapsed_macro!(543); + collapsed_macro!(544); + collapsed_macro!(545); + collapsed_macro!(546); + collapsed_macro!(547); + collapsed_macro!(548); + collapsed_macro!(549); + collapsed_macro!(550); + collapsed_macro!(551); + collapsed_macro!(552); + collapsed_macro!(553); + collapsed_macro!(554); + collapsed_macro!(555); + collapsed_macro!(556); + collapsed_macro!(557); + collapsed_macro!(558); + collapsed_macro!(559); + collapsed_macro!(560); + collapsed_macro!(561); + collapsed_macro!(562); + collapsed_macro!(563); + collapsed_macro!(564); + collapsed_macro!(565); + collapsed_macro!(566); + collapsed_macro!(567); + collapsed_macro!(568); + collapsed_macro!(569); + collapsed_macro!(570); + collapsed_macro!(571); + collapsed_macro!(572); + collapsed_macro!(573); + collapsed_macro!(574); + collapsed_macro!(575); + collapsed_macro!(576); + collapsed_macro!(577); + collapsed_macro!(578); + collapsed_macro!(579); + collapsed_macro!(580); + collapsed_macro!(581); + collapsed_macro!(582); + collapsed_macro!(583); + collapsed_macro!(584); + collapsed_macro!(585); + collapsed_macro!(586); + collapsed_macro!(587); + collapsed_macro!(588); + collapsed_macro!(589); + collapsed_macro!(590); + collapsed_macro!(591); + collapsed_macro!(592); + collapsed_macro!(593); + collapsed_macro!(594); + collapsed_macro!(595); + collapsed_macro!(596); + collapsed_macro!(597); + collapsed_macro!(598); + collapsed_macro!(599); + collapsed_macro!(600); + collapsed_macro!(601); + collapsed_macro!(602); + collapsed_macro!(603); + collapsed_macro!(604); + collapsed_macro!(605); + collapsed_macro!(606); + collapsed_macro!(607); + collapsed_macro!(608); + collapsed_macro!(609); + collapsed_macro!(610); + collapsed_macro!(611); + collapsed_macro!(612); + collapsed_macro!(613); + collapsed_macro!(614); + collapsed_macro!(615); + collapsed_macro!(616); + collapsed_macro!(617); + collapsed_macro!(618); + collapsed_macro!(619); + collapsed_macro!(620); + collapsed_macro!(621); + collapsed_macro!(622); + collapsed_macro!(623); + collapsed_macro!(624); + collapsed_macro!(625); + collapsed_macro!(626); + collapsed_macro!(627); + collapsed_macro!(628); + collapsed_macro!(629); + collapsed_macro!(630); + collapsed_macro!(631); + collapsed_macro!(632); + collapsed_macro!(633); + collapsed_macro!(634); + collapsed_macro!(635); + collapsed_macro!(636); + collapsed_macro!(637); + collapsed_macro!(638); + collapsed_macro!(639); + collapsed_macro!(640); + collapsed_macro!(641); + collapsed_macro!(642); + collapsed_macro!(643); + collapsed_macro!(644); + collapsed_macro!(645); + collapsed_macro!(646); + collapsed_macro!(647); + collapsed_macro!(648); + collapsed_macro!(649); + collapsed_macro!(650); + collapsed_macro!(651); + collapsed_macro!(652); + collapsed_macro!(653); + collapsed_macro!(654); + collapsed_macro!(655); + collapsed_macro!(656); + collapsed_macro!(657); + collapsed_macro!(658); + collapsed_macro!(659); + collapsed_macro!(660); + collapsed_macro!(661); + collapsed_macro!(662); + collapsed_macro!(663); + collapsed_macro!(664); + collapsed_macro!(665); + collapsed_macro!(666); + collapsed_macro!(667); + collapsed_macro!(668); + collapsed_macro!(669); + collapsed_macro!(670); + collapsed_macro!(671); + collapsed_macro!(672); + collapsed_macro!(673); + collapsed_macro!(674); + collapsed_macro!(675); + collapsed_macro!(676); + collapsed_macro!(677); + collapsed_macro!(678); + collapsed_macro!(679); + collapsed_macro!(680); + collapsed_macro!(681); + collapsed_macro!(682); + collapsed_macro!(683); + collapsed_macro!(684); + collapsed_macro!(685); + collapsed_macro!(686); + collapsed_macro!(687); + collapsed_macro!(688); + collapsed_macro!(689); + collapsed_macro!(690); + collapsed_macro!(691); + collapsed_macro!(692); + collapsed_macro!(693); + collapsed_macro!(694); + collapsed_macro!(695); + collapsed_macro!(696); + collapsed_macro!(697); + collapsed_macro!(698); + collapsed_macro!(699); + collapsed_macro!(700); + collapsed_macro!(701); + collapsed_macro!(702); + collapsed_macro!(703); + collapsed_macro!(704); + collapsed_macro!(705); + collapsed_macro!(706); + collapsed_macro!(707); + collapsed_macro!(708); + collapsed_macro!(709); + collapsed_macro!(710); + collapsed_macro!(711); + collapsed_macro!(712); + collapsed_macro!(713); + collapsed_macro!(714); + collapsed_macro!(715); + collapsed_macro!(716); + collapsed_macro!(717); + collapsed_macro!(718); + collapsed_macro!(719); + collapsed_macro!(720); + collapsed_macro!(721); + collapsed_macro!(722); + collapsed_macro!(723); + collapsed_macro!(724); + collapsed_macro!(725); + collapsed_macro!(726); + collapsed_macro!(727); + collapsed_macro!(728); + collapsed_macro!(729); + collapsed_macro!(730); + collapsed_macro!(731); + collapsed_macro!(732); + collapsed_macro!(733); + collapsed_macro!(734); + collapsed_macro!(735); + collapsed_macro!(736); + collapsed_macro!(737); + collapsed_macro!(738); + collapsed_macro!(739); + collapsed_macro!(740); + collapsed_macro!(741); + collapsed_macro!(742); + collapsed_macro!(743); + collapsed_macro!(744); + collapsed_macro!(745); + collapsed_macro!(746); + collapsed_macro!(747); + collapsed_macro!(748); + collapsed_macro!(749); + collapsed_macro!(750); + collapsed_macro!(751); + collapsed_macro!(752); + collapsed_macro!(753); + collapsed_macro!(754); + collapsed_macro!(755); + collapsed_macro!(756); + collapsed_macro!(757); + collapsed_macro!(758); + collapsed_macro!(759); + collapsed_macro!(760); + collapsed_macro!(761); + collapsed_macro!(762); + collapsed_macro!(763); + collapsed_macro!(764); + collapsed_macro!(765); + collapsed_macro!(766); + collapsed_macro!(767); + collapsed_macro!(768); + collapsed_macro!(769); + collapsed_macro!(770); + collapsed_macro!(771); + collapsed_macro!(772); + collapsed_macro!(773); + collapsed_macro!(774); + collapsed_macro!(775); + collapsed_macro!(776); + collapsed_macro!(777); + collapsed_macro!(778); + collapsed_macro!(779); + collapsed_macro!(780); + collapsed_macro!(781); + collapsed_macro!(782); + collapsed_macro!(783); + collapsed_macro!(784); + collapsed_macro!(785); + collapsed_macro!(786); + collapsed_macro!(787); + collapsed_macro!(788); + collapsed_macro!(789); + collapsed_macro!(790); + collapsed_macro!(791); + collapsed_macro!(792); + collapsed_macro!(793); + collapsed_macro!(794); + collapsed_macro!(795); + collapsed_macro!(796); + collapsed_macro!(797); + collapsed_macro!(798); + collapsed_macro!(799); + collapsed_macro!(800); + collapsed_macro!(801); + collapsed_macro!(802); + collapsed_macro!(803); + collapsed_macro!(804); + collapsed_macro!(805); + collapsed_macro!(806); + collapsed_macro!(807); + collapsed_macro!(808); + collapsed_macro!(809); + collapsed_macro!(810); + collapsed_macro!(811); + collapsed_macro!(812); + collapsed_macro!(813); + collapsed_macro!(814); + collapsed_macro!(815); + collapsed_macro!(816); + collapsed_macro!(817); + collapsed_macro!(818); + collapsed_macro!(819); + collapsed_macro!(820); + collapsed_macro!(821); + collapsed_macro!(822); + collapsed_macro!(823); + collapsed_macro!(824); + collapsed_macro!(825); + collapsed_macro!(826); + collapsed_macro!(827); + collapsed_macro!(828); + collapsed_macro!(829); + collapsed_macro!(830); + collapsed_macro!(831); + collapsed_macro!(832); + collapsed_macro!(833); + collapsed_macro!(834); + collapsed_macro!(835); + collapsed_macro!(836); + collapsed_macro!(837); + collapsed_macro!(838); + collapsed_macro!(839); + collapsed_macro!(840); + collapsed_macro!(841); + collapsed_macro!(842); + collapsed_macro!(843); + collapsed_macro!(844); + collapsed_macro!(845); + collapsed_macro!(846); + collapsed_macro!(847); + collapsed_macro!(848); + collapsed_macro!(849); + collapsed_macro!(850); + collapsed_macro!(851); + collapsed_macro!(852); + collapsed_macro!(853); + collapsed_macro!(854); + collapsed_macro!(855); + collapsed_macro!(856); + collapsed_macro!(857); + collapsed_macro!(858); + collapsed_macro!(859); + collapsed_macro!(860); + collapsed_macro!(861); + collapsed_macro!(862); + collapsed_macro!(863); + collapsed_macro!(864); + collapsed_macro!(865); + collapsed_macro!(866); + collapsed_macro!(867); + collapsed_macro!(868); + collapsed_macro!(869); + collapsed_macro!(870); + collapsed_macro!(871); + collapsed_macro!(872); + collapsed_macro!(873); + collapsed_macro!(874); + collapsed_macro!(875); + collapsed_macro!(876); + collapsed_macro!(877); + collapsed_macro!(878); + collapsed_macro!(879); + collapsed_macro!(880); + collapsed_macro!(881); + collapsed_macro!(882); + collapsed_macro!(883); + collapsed_macro!(884); + collapsed_macro!(885); + collapsed_macro!(886); + collapsed_macro!(887); + collapsed_macro!(888); + collapsed_macro!(889); + collapsed_macro!(890); + collapsed_macro!(891); + collapsed_macro!(892); + collapsed_macro!(893); + collapsed_macro!(894); + collapsed_macro!(895); + collapsed_macro!(896); + collapsed_macro!(897); + collapsed_macro!(898); + collapsed_macro!(899); + collapsed_macro!(900); + collapsed_macro!(901); + collapsed_macro!(902); + collapsed_macro!(903); + collapsed_macro!(904); + collapsed_macro!(905); + collapsed_macro!(906); + collapsed_macro!(907); + collapsed_macro!(908); + collapsed_macro!(909); + collapsed_macro!(910); + collapsed_macro!(911); + collapsed_macro!(912); + collapsed_macro!(913); + collapsed_macro!(914); + collapsed_macro!(915); + collapsed_macro!(916); + collapsed_macro!(917); + collapsed_macro!(918); + collapsed_macro!(919); + collapsed_macro!(920); + collapsed_macro!(921); + collapsed_macro!(922); + collapsed_macro!(923); + collapsed_macro!(924); + collapsed_macro!(925); + collapsed_macro!(926); + collapsed_macro!(927); + collapsed_macro!(928); + collapsed_macro!(929); + collapsed_macro!(930); + collapsed_macro!(931); + collapsed_macro!(932); + collapsed_macro!(933); + collapsed_macro!(934); + collapsed_macro!(935); + collapsed_macro!(936); + collapsed_macro!(937); + collapsed_macro!(938); + collapsed_macro!(939); + collapsed_macro!(940); + collapsed_macro!(941); + collapsed_macro!(942); + collapsed_macro!(943); + collapsed_macro!(944); + collapsed_macro!(945); + collapsed_macro!(946); + collapsed_macro!(947); + collapsed_macro!(948); + collapsed_macro!(949); + collapsed_macro!(950); + collapsed_macro!(951); + collapsed_macro!(952); + collapsed_macro!(953); + collapsed_macro!(954); + collapsed_macro!(955); + collapsed_macro!(956); + collapsed_macro!(957); + collapsed_macro!(958); + collapsed_macro!(959); + collapsed_macro!(960); + collapsed_macro!(961); + collapsed_macro!(962); + collapsed_macro!(963); + collapsed_macro!(964); + collapsed_macro!(965); + collapsed_macro!(966); + collapsed_macro!(967); + collapsed_macro!(968); + collapsed_macro!(969); + collapsed_macro!(970); + collapsed_macro!(971); + collapsed_macro!(972); + collapsed_macro!(973); + collapsed_macro!(974); + collapsed_macro!(975); + collapsed_macro!(976); + collapsed_macro!(977); + collapsed_macro!(978); + collapsed_macro!(979); + collapsed_macro!(980); + collapsed_macro!(981); + collapsed_macro!(982); + collapsed_macro!(983); + collapsed_macro!(984); + collapsed_macro!(985); + collapsed_macro!(986); + collapsed_macro!(987); + collapsed_macro!(988); + collapsed_macro!(989); + collapsed_macro!(990); + collapsed_macro!(991); + collapsed_macro!(992); + collapsed_macro!(993); + collapsed_macro!(994); + collapsed_macro!(995); + collapsed_macro!(996); + collapsed_macro!(997); + collapsed_macro!(998); + collapsed_macro!(999); + collapsed_macro!(1000); + collapsed_macro!(1001); + collapsed_macro!(1002); + collapsed_macro!(1003); + collapsed_macro!(1004); + collapsed_macro!(1005); + collapsed_macro!(1006); + collapsed_macro!(1007); + collapsed_macro!(1008); + collapsed_macro!(1009); + collapsed_macro!(1010); + collapsed_macro!(1011); + collapsed_macro!(1012); + collapsed_macro!(1013); + collapsed_macro!(1014); + collapsed_macro!(1015); + collapsed_macro!(1016); + collapsed_macro!(1017); + collapsed_macro!(1018); + collapsed_macro!(1019); + collapsed_macro!(1020); + collapsed_macro!(1021); + collapsed_macro!(1022); + collapsed_macro!(1023); + collapsed_macro!(1024); + collapsed_macro!(1025); + collapsed_macro!(1026); + collapsed_macro!(1027); + collapsed_macro!(1028); + collapsed_macro!(1029); + collapsed_macro!(1030); + collapsed_macro!(1031); + collapsed_macro!(1032); + collapsed_macro!(1033); + collapsed_macro!(1034); + collapsed_macro!(1035); + collapsed_macro!(1036); + collapsed_macro!(1037); + collapsed_macro!(1038); + collapsed_macro!(1039); + collapsed_macro!(1040); + collapsed_macro!(1041); + collapsed_macro!(1042); + collapsed_macro!(1043); + collapsed_macro!(1044); + collapsed_macro!(1045); + collapsed_macro!(1046); + collapsed_macro!(1047); + collapsed_macro!(1048); + collapsed_macro!(1049); + collapsed_macro!(1050); + collapsed_macro!(1051); + collapsed_macro!(1052); + collapsed_macro!(1053); + collapsed_macro!(1054); + collapsed_macro!(1055); + collapsed_macro!(1056); + collapsed_macro!(1057); + collapsed_macro!(1058); + collapsed_macro!(1059); + collapsed_macro!(1060); + collapsed_macro!(1061); + collapsed_macro!(1062); + collapsed_macro!(1063); + collapsed_macro!(1064); + collapsed_macro!(1065); + collapsed_macro!(1066); + collapsed_macro!(1067); + collapsed_macro!(1068); + collapsed_macro!(1069); + collapsed_macro!(1070); + collapsed_macro!(1071); + collapsed_macro!(1072); + collapsed_macro!(1073); + collapsed_macro!(1074); + collapsed_macro!(1075); + collapsed_macro!(1076); + collapsed_macro!(1077); + collapsed_macro!(1078); + collapsed_macro!(1079); + collapsed_macro!(1080); + collapsed_macro!(1081); + collapsed_macro!(1082); + collapsed_macro!(1083); + collapsed_macro!(1084); + collapsed_macro!(1085); + collapsed_macro!(1086); + collapsed_macro!(1087); + collapsed_macro!(1088); + collapsed_macro!(1089); + collapsed_macro!(1090); + collapsed_macro!(1091); + collapsed_macro!(1092); + collapsed_macro!(1093); + collapsed_macro!(1094); + collapsed_macro!(1095); + collapsed_macro!(1096); + collapsed_macro!(1097); + collapsed_macro!(1098); + collapsed_macro!(1099); + collapsed_macro!(1100); + collapsed_macro!(1101); + collapsed_macro!(1102); + collapsed_macro!(1103); + collapsed_macro!(1104); + collapsed_macro!(1105); + collapsed_macro!(1106); + collapsed_macro!(1107); + collapsed_macro!(1108); + collapsed_macro!(1109); + collapsed_macro!(1110); + collapsed_macro!(1111); + collapsed_macro!(1112); + collapsed_macro!(1113); + collapsed_macro!(1114); + collapsed_macro!(1115); + collapsed_macro!(1116); + collapsed_macro!(1117); + collapsed_macro!(1118); + collapsed_macro!(1119); + collapsed_macro!(1120); + collapsed_macro!(1121); + collapsed_macro!(1122); + collapsed_macro!(1123); + collapsed_macro!(1124); + collapsed_macro!(1125); + collapsed_macro!(1126); + collapsed_macro!(1127); + collapsed_macro!(1128); + collapsed_macro!(1129); + collapsed_macro!(1130); + collapsed_macro!(1131); + collapsed_macro!(1132); + collapsed_macro!(1133); + collapsed_macro!(1134); + collapsed_macro!(1135); + collapsed_macro!(1136); + collapsed_macro!(1137); + collapsed_macro!(1138); + collapsed_macro!(1139); + collapsed_macro!(1140); + collapsed_macro!(1141); + collapsed_macro!(1142); + collapsed_macro!(1143); + collapsed_macro!(1144); + collapsed_macro!(1145); + collapsed_macro!(1146); + collapsed_macro!(1147); + collapsed_macro!(1148); + collapsed_macro!(1149); + collapsed_macro!(1150); + collapsed_macro!(1151); + collapsed_macro!(1152); + collapsed_macro!(1153); + collapsed_macro!(1154); + collapsed_macro!(1155); + collapsed_macro!(1156); + collapsed_macro!(1157); + collapsed_macro!(1158); + collapsed_macro!(1159); + collapsed_macro!(1160); + collapsed_macro!(1161); + collapsed_macro!(1162); + collapsed_macro!(1163); + collapsed_macro!(1164); + collapsed_macro!(1165); + collapsed_macro!(1166); + collapsed_macro!(1167); + collapsed_macro!(1168); + collapsed_macro!(1169); + collapsed_macro!(1170); + collapsed_macro!(1171); + collapsed_macro!(1172); + collapsed_macro!(1173); + collapsed_macro!(1174); + collapsed_macro!(1175); + collapsed_macro!(1176); + collapsed_macro!(1177); + collapsed_macro!(1178); + collapsed_macro!(1179); + collapsed_macro!(1180); + collapsed_macro!(1181); + collapsed_macro!(1182); + collapsed_macro!(1183); + collapsed_macro!(1184); + collapsed_macro!(1185); + collapsed_macro!(1186); + collapsed_macro!(1187); + collapsed_macro!(1188); + collapsed_macro!(1189); + collapsed_macro!(1190); + collapsed_macro!(1191); + collapsed_macro!(1192); + collapsed_macro!(1193); + collapsed_macro!(1194); + collapsed_macro!(1195); + collapsed_macro!(1196); + collapsed_macro!(1197); + collapsed_macro!(1198); + collapsed_macro!(1199); + collapsed_macro!(1200); + collapsed_macro!(1201); + collapsed_macro!(1202); + collapsed_macro!(1203); + collapsed_macro!(1204); + collapsed_macro!(1205); + collapsed_macro!(1206); + collapsed_macro!(1207); + collapsed_macro!(1208); + collapsed_macro!(1209); + collapsed_macro!(1210); + collapsed_macro!(1211); + collapsed_macro!(1212); + collapsed_macro!(1213); + collapsed_macro!(1214); + collapsed_macro!(1215); + collapsed_macro!(1216); + collapsed_macro!(1217); + collapsed_macro!(1218); + collapsed_macro!(1219); + collapsed_macro!(1220); + collapsed_macro!(1221); + collapsed_macro!(1222); + collapsed_macro!(1223); + collapsed_macro!(1224); + collapsed_macro!(1225); + collapsed_macro!(1226); + collapsed_macro!(1227); + collapsed_macro!(1228); + collapsed_macro!(1229); + collapsed_macro!(1230); + collapsed_macro!(1231); + collapsed_macro!(1232); + collapsed_macro!(1233); + collapsed_macro!(1234); + collapsed_macro!(1235); + collapsed_macro!(1236); + collapsed_macro!(1237); + collapsed_macro!(1238); + collapsed_macro!(1239); + collapsed_macro!(1240); + collapsed_macro!(1241); + collapsed_macro!(1242); + collapsed_macro!(1243); + collapsed_macro!(1244); + collapsed_macro!(1245); + collapsed_macro!(1246); + collapsed_macro!(1247); + collapsed_macro!(1248); + collapsed_macro!(1249); + collapsed_macro!(1250); + collapsed_macro!(1251); + collapsed_macro!(1252); + collapsed_macro!(1253); + collapsed_macro!(1254); + collapsed_macro!(1255); + collapsed_macro!(1256); + collapsed_macro!(1257); + collapsed_macro!(1258); + collapsed_macro!(1259); + collapsed_macro!(1260); + collapsed_macro!(1261); + collapsed_macro!(1262); + collapsed_macro!(1263); + collapsed_macro!(1264); + collapsed_macro!(1265); + collapsed_macro!(1266); + collapsed_macro!(1267); + collapsed_macro!(1268); + collapsed_macro!(1269); + collapsed_macro!(1270); + collapsed_macro!(1271); + collapsed_macro!(1272); + collapsed_macro!(1273); + collapsed_macro!(1274); + collapsed_macro!(1275); + collapsed_macro!(1276); + collapsed_macro!(1277); + collapsed_macro!(1278); + collapsed_macro!(1279); + collapsed_macro!(1280); + collapsed_macro!(1281); + collapsed_macro!(1282); + collapsed_macro!(1283); + collapsed_macro!(1284); + collapsed_macro!(1285); + collapsed_macro!(1286); + collapsed_macro!(1287); + collapsed_macro!(1288); + collapsed_macro!(1289); + collapsed_macro!(1290); + collapsed_macro!(1291); + collapsed_macro!(1292); + collapsed_macro!(1293); + collapsed_macro!(1294); + collapsed_macro!(1295); + collapsed_macro!(1296); + collapsed_macro!(1297); + collapsed_macro!(1298); + collapsed_macro!(1299); + collapsed_macro!(1300); + collapsed_macro!(1301); + collapsed_macro!(1302); + collapsed_macro!(1303); + collapsed_macro!(1304); + collapsed_macro!(1305); + collapsed_macro!(1306); + collapsed_macro!(1307); + collapsed_macro!(1308); + collapsed_macro!(1309); + collapsed_macro!(1310); + collapsed_macro!(1311); + collapsed_macro!(1312); + collapsed_macro!(1313); + collapsed_macro!(1314); + collapsed_macro!(1315); + collapsed_macro!(1316); + collapsed_macro!(1317); + collapsed_macro!(1318); + collapsed_macro!(1319); + collapsed_macro!(1320); + collapsed_macro!(1321); + collapsed_macro!(1322); + collapsed_macro!(1323); + collapsed_macro!(1324); + collapsed_macro!(1325); + collapsed_macro!(1326); + collapsed_macro!(1327); + collapsed_macro!(1328); + collapsed_macro!(1329); + collapsed_macro!(1330); + collapsed_macro!(1331); + collapsed_macro!(1332); + collapsed_macro!(1333); + collapsed_macro!(1334); + collapsed_macro!(1335); + collapsed_macro!(1336); + collapsed_macro!(1337); + collapsed_macro!(1338); + collapsed_macro!(1339); + collapsed_macro!(1340); + collapsed_macro!(1341); + collapsed_macro!(1342); + collapsed_macro!(1343); + collapsed_macro!(1344); + collapsed_macro!(1345); + collapsed_macro!(1346); + collapsed_macro!(1347); + collapsed_macro!(1348); + collapsed_macro!(1349); + collapsed_macro!(1350); + collapsed_macro!(1351); + collapsed_macro!(1352); + collapsed_macro!(1353); + collapsed_macro!(1354); + collapsed_macro!(1355); + collapsed_macro!(1356); + collapsed_macro!(1357); + collapsed_macro!(1358); + collapsed_macro!(1359); + collapsed_macro!(1360); + collapsed_macro!(1361); + collapsed_macro!(1362); + collapsed_macro!(1363); + collapsed_macro!(1364); + collapsed_macro!(1365); + collapsed_macro!(1366); + collapsed_macro!(1367); + collapsed_macro!(1368); + collapsed_macro!(1369); + collapsed_macro!(1370); + collapsed_macro!(1371); + collapsed_macro!(1372); + collapsed_macro!(1373); + collapsed_macro!(1374); + collapsed_macro!(1375); + collapsed_macro!(1376); + collapsed_macro!(1377); + collapsed_macro!(1378); + collapsed_macro!(1379); + collapsed_macro!(1380); + collapsed_macro!(1381); + collapsed_macro!(1382); + collapsed_macro!(1383); + collapsed_macro!(1384); + collapsed_macro!(1385); + collapsed_macro!(1386); + collapsed_macro!(1387); + collapsed_macro!(1388); + collapsed_macro!(1389); + collapsed_macro!(1390); + collapsed_macro!(1391); + collapsed_macro!(1392); + collapsed_macro!(1393); + collapsed_macro!(1394); + collapsed_macro!(1395); + collapsed_macro!(1396); + collapsed_macro!(1397); + collapsed_macro!(1398); + collapsed_macro!(1399); + collapsed_macro!(1400); + collapsed_macro!(1401); + collapsed_macro!(1402); + collapsed_macro!(1403); + collapsed_macro!(1404); + collapsed_macro!(1405); + collapsed_macro!(1406); + collapsed_macro!(1407); + collapsed_macro!(1408); + collapsed_macro!(1409); + collapsed_macro!(1410); + collapsed_macro!(1411); + collapsed_macro!(1412); + collapsed_macro!(1413); + collapsed_macro!(1414); + collapsed_macro!(1415); + collapsed_macro!(1416); + collapsed_macro!(1417); + collapsed_macro!(1418); + collapsed_macro!(1419); + collapsed_macro!(1420); + collapsed_macro!(1421); + collapsed_macro!(1422); + collapsed_macro!(1423); + collapsed_macro!(1424); + collapsed_macro!(1425); + collapsed_macro!(1426); + collapsed_macro!(1427); + collapsed_macro!(1428); + collapsed_macro!(1429); + collapsed_macro!(1430); + collapsed_macro!(1431); + collapsed_macro!(1432); + collapsed_macro!(1433); + collapsed_macro!(1434); + collapsed_macro!(1435); + collapsed_macro!(1436); + collapsed_macro!(1437); + collapsed_macro!(1438); + collapsed_macro!(1439); + collapsed_macro!(1440); + collapsed_macro!(1441); + collapsed_macro!(1442); + collapsed_macro!(1443); + collapsed_macro!(1444); + collapsed_macro!(1445); + collapsed_macro!(1446); + collapsed_macro!(1447); + collapsed_macro!(1448); + collapsed_macro!(1449); + collapsed_macro!(1450); + collapsed_macro!(1451); + collapsed_macro!(1452); + collapsed_macro!(1453); + collapsed_macro!(1454); + collapsed_macro!(1455); + collapsed_macro!(1456); + collapsed_macro!(1457); + collapsed_macro!(1458); + collapsed_macro!(1459); + collapsed_macro!(1460); + collapsed_macro!(1461); + collapsed_macro!(1462); + collapsed_macro!(1463); + collapsed_macro!(1464); + collapsed_macro!(1465); + collapsed_macro!(1466); + collapsed_macro!(1467); + collapsed_macro!(1468); + collapsed_macro!(1469); + collapsed_macro!(1470); + collapsed_macro!(1471); + collapsed_macro!(1472); + collapsed_macro!(1473); + collapsed_macro!(1474); + collapsed_macro!(1475); + collapsed_macro!(1476); + collapsed_macro!(1477); + collapsed_macro!(1478); + collapsed_macro!(1479); + collapsed_macro!(1480); + collapsed_macro!(1481); + collapsed_macro!(1482); + collapsed_macro!(1483); + collapsed_macro!(1484); + collapsed_macro!(1485); + collapsed_macro!(1486); + collapsed_macro!(1487); + collapsed_macro!(1488); + collapsed_macro!(1489); + collapsed_macro!(1490); + collapsed_macro!(1491); + collapsed_macro!(1492); + collapsed_macro!(1493); + collapsed_macro!(1494); + collapsed_macro!(1495); + collapsed_macro!(1496); + collapsed_macro!(1497); + collapsed_macro!(1498); + collapsed_macro!(1499); + collapsed_macro!(1500); + collapsed_macro!(1501); + collapsed_macro!(1502); + collapsed_macro!(1503); + collapsed_macro!(1504); + collapsed_macro!(1505); + collapsed_macro!(1506); + collapsed_macro!(1507); + collapsed_macro!(1508); + collapsed_macro!(1509); + collapsed_macro!(1510); + collapsed_macro!(1511); + collapsed_macro!(1512); + collapsed_macro!(1513); + collapsed_macro!(1514); + collapsed_macro!(1515); + collapsed_macro!(1516); + collapsed_macro!(1517); + collapsed_macro!(1518); + collapsed_macro!(1519); + collapsed_macro!(1520); + collapsed_macro!(1521); + collapsed_macro!(1522); + collapsed_macro!(1523); + collapsed_macro!(1524); + collapsed_macro!(1525); + collapsed_macro!(1526); + collapsed_macro!(1527); + collapsed_macro!(1528); + collapsed_macro!(1529); + collapsed_macro!(1530); + collapsed_macro!(1531); + collapsed_macro!(1532); + collapsed_macro!(1533); + collapsed_macro!(1534); + collapsed_macro!(1535); + collapsed_macro!(1536); + collapsed_macro!(1537); + collapsed_macro!(1538); + collapsed_macro!(1539); + collapsed_macro!(1540); + collapsed_macro!(1541); + collapsed_macro!(1542); + collapsed_macro!(1543); + collapsed_macro!(1544); + collapsed_macro!(1545); + collapsed_macro!(1546); + collapsed_macro!(1547); + collapsed_macro!(1548); + collapsed_macro!(1549); + collapsed_macro!(1550); + collapsed_macro!(1551); + collapsed_macro!(1552); + collapsed_macro!(1553); + collapsed_macro!(1554); + collapsed_macro!(1555); + collapsed_macro!(1556); + collapsed_macro!(1557); + collapsed_macro!(1558); + collapsed_macro!(1559); + collapsed_macro!(1560); + collapsed_macro!(1561); + collapsed_macro!(1562); + collapsed_macro!(1563); + collapsed_macro!(1564); + collapsed_macro!(1565); + collapsed_macro!(1566); + collapsed_macro!(1567); + collapsed_macro!(1568); + collapsed_macro!(1569); + collapsed_macro!(1570); + collapsed_macro!(1571); + collapsed_macro!(1572); + collapsed_macro!(1573); + collapsed_macro!(1574); + collapsed_macro!(1575); + collapsed_macro!(1576); + collapsed_macro!(1577); + collapsed_macro!(1578); + collapsed_macro!(1579); + collapsed_macro!(1580); + collapsed_macro!(1581); + collapsed_macro!(1582); + collapsed_macro!(1583); + collapsed_macro!(1584); + collapsed_macro!(1585); + collapsed_macro!(1586); + collapsed_macro!(1587); + collapsed_macro!(1588); + collapsed_macro!(1589); + collapsed_macro!(1590); + collapsed_macro!(1591); + collapsed_macro!(1592); + collapsed_macro!(1593); + collapsed_macro!(1594); + collapsed_macro!(1595); + collapsed_macro!(1596); + collapsed_macro!(1597); + collapsed_macro!(1598); + collapsed_macro!(1599); + collapsed_macro!(1600); + collapsed_macro!(1601); + collapsed_macro!(1602); + collapsed_macro!(1603); + collapsed_macro!(1604); + collapsed_macro!(1605); + collapsed_macro!(1606); + collapsed_macro!(1607); + collapsed_macro!(1608); + collapsed_macro!(1609); + collapsed_macro!(1610); + collapsed_macro!(1611); + collapsed_macro!(1612); + collapsed_macro!(1613); + collapsed_macro!(1614); + collapsed_macro!(1615); + collapsed_macro!(1616); + collapsed_macro!(1617); + collapsed_macro!(1618); + collapsed_macro!(1619); + collapsed_macro!(1620); + collapsed_macro!(1621); + collapsed_macro!(1622); + collapsed_macro!(1623); + collapsed_macro!(1624); + collapsed_macro!(1625); + collapsed_macro!(1626); + collapsed_macro!(1627); + collapsed_macro!(1628); + collapsed_macro!(1629); + collapsed_macro!(1630); + collapsed_macro!(1631); + collapsed_macro!(1632); + collapsed_macro!(1633); + collapsed_macro!(1634); + collapsed_macro!(1635); + collapsed_macro!(1636); + collapsed_macro!(1637); + collapsed_macro!(1638); + collapsed_macro!(1639); + collapsed_macro!(1640); + collapsed_macro!(1641); + collapsed_macro!(1642); + collapsed_macro!(1643); + collapsed_macro!(1644); + collapsed_macro!(1645); + collapsed_macro!(1646); + collapsed_macro!(1647); + collapsed_macro!(1648); + collapsed_macro!(1649); + collapsed_macro!(1650); + collapsed_macro!(1651); + collapsed_macro!(1652); + collapsed_macro!(1653); + collapsed_macro!(1654); + collapsed_macro!(1655); + collapsed_macro!(1656); + collapsed_macro!(1657); + collapsed_macro!(1658); + collapsed_macro!(1659); + collapsed_macro!(1660); + collapsed_macro!(1661); + collapsed_macro!(1662); + collapsed_macro!(1663); + collapsed_macro!(1664); + collapsed_macro!(1665); + collapsed_macro!(1666); + collapsed_macro!(1667); + collapsed_macro!(1668); + collapsed_macro!(1669); + collapsed_macro!(1670); + collapsed_macro!(1671); + collapsed_macro!(1672); + collapsed_macro!(1673); + collapsed_macro!(1674); + collapsed_macro!(1675); + collapsed_macro!(1676); + collapsed_macro!(1677); + collapsed_macro!(1678); + collapsed_macro!(1679); + collapsed_macro!(1680); + collapsed_macro!(1681); + collapsed_macro!(1682); + collapsed_macro!(1683); + collapsed_macro!(1684); + collapsed_macro!(1685); + collapsed_macro!(1686); + collapsed_macro!(1687); + collapsed_macro!(1688); + collapsed_macro!(1689); + collapsed_macro!(1690); + collapsed_macro!(1691); + collapsed_macro!(1692); + collapsed_macro!(1693); + collapsed_macro!(1694); + collapsed_macro!(1695); + collapsed_macro!(1696); + collapsed_macro!(1697); + collapsed_macro!(1698); + collapsed_macro!(1699); + collapsed_macro!(1700); + collapsed_macro!(1701); + collapsed_macro!(1702); + collapsed_macro!(1703); + collapsed_macro!(1704); + collapsed_macro!(1705); + collapsed_macro!(1706); + collapsed_macro!(1707); + collapsed_macro!(1708); + collapsed_macro!(1709); + collapsed_macro!(1710); + collapsed_macro!(1711); + collapsed_macro!(1712); + collapsed_macro!(1713); + collapsed_macro!(1714); + collapsed_macro!(1715); + collapsed_macro!(1716); + collapsed_macro!(1717); + collapsed_macro!(1718); + collapsed_macro!(1719); + collapsed_macro!(1720); + collapsed_macro!(1721); + collapsed_macro!(1722); + collapsed_macro!(1723); + collapsed_macro!(1724); + collapsed_macro!(1725); + collapsed_macro!(1726); + collapsed_macro!(1727); + collapsed_macro!(1728); + collapsed_macro!(1729); + collapsed_macro!(1730); + collapsed_macro!(1731); + collapsed_macro!(1732); + collapsed_macro!(1733); + collapsed_macro!(1734); + collapsed_macro!(1735); + collapsed_macro!(1736); + collapsed_macro!(1737); + collapsed_macro!(1738); + collapsed_macro!(1739); + collapsed_macro!(1740); + collapsed_macro!(1741); + collapsed_macro!(1742); + collapsed_macro!(1743); + collapsed_macro!(1744); + collapsed_macro!(1745); + collapsed_macro!(1746); + collapsed_macro!(1747); + collapsed_macro!(1748); + collapsed_macro!(1749); + collapsed_macro!(1750); + collapsed_macro!(1751); + collapsed_macro!(1752); + collapsed_macro!(1753); + collapsed_macro!(1754); + collapsed_macro!(1755); + collapsed_macro!(1756); + collapsed_macro!(1757); + collapsed_macro!(1758); + collapsed_macro!(1759); + collapsed_macro!(1760); + collapsed_macro!(1761); + collapsed_macro!(1762); + collapsed_macro!(1763); + collapsed_macro!(1764); + collapsed_macro!(1765); + collapsed_macro!(1766); + collapsed_macro!(1767); + collapsed_macro!(1768); + collapsed_macro!(1769); + collapsed_macro!(1770); + collapsed_macro!(1771); + collapsed_macro!(1772); + collapsed_macro!(1773); + collapsed_macro!(1774); + collapsed_macro!(1775); + collapsed_macro!(1776); + collapsed_macro!(1777); + collapsed_macro!(1778); + collapsed_macro!(1779); + collapsed_macro!(1780); + collapsed_macro!(1781); + collapsed_macro!(1782); + collapsed_macro!(1783); + collapsed_macro!(1784); + collapsed_macro!(1785); + collapsed_macro!(1786); + collapsed_macro!(1787); + collapsed_macro!(1788); + collapsed_macro!(1789); + collapsed_macro!(1790); + collapsed_macro!(1791); + collapsed_macro!(1792); + collapsed_macro!(1793); + collapsed_macro!(1794); + collapsed_macro!(1795); + collapsed_macro!(1796); + collapsed_macro!(1797); + collapsed_macro!(1798); + collapsed_macro!(1799); + collapsed_macro!(1800); + collapsed_macro!(1801); + collapsed_macro!(1802); + collapsed_macro!(1803); + collapsed_macro!(1804); + collapsed_macro!(1805); + collapsed_macro!(1806); + collapsed_macro!(1807); + collapsed_macro!(1808); + collapsed_macro!(1809); + collapsed_macro!(1810); + collapsed_macro!(1811); + collapsed_macro!(1812); + collapsed_macro!(1813); + collapsed_macro!(1814); + collapsed_macro!(1815); + collapsed_macro!(1816); + collapsed_macro!(1817); + collapsed_macro!(1818); + collapsed_macro!(1819); + collapsed_macro!(1820); + collapsed_macro!(1821); + collapsed_macro!(1822); + collapsed_macro!(1823); + collapsed_macro!(1824); + collapsed_macro!(1825); + collapsed_macro!(1826); + collapsed_macro!(1827); + collapsed_macro!(1828); + collapsed_macro!(1829); + collapsed_macro!(1830); + collapsed_macro!(1831); + collapsed_macro!(1832); + collapsed_macro!(1833); + collapsed_macro!(1834); + collapsed_macro!(1835); + collapsed_macro!(1836); + collapsed_macro!(1837); + collapsed_macro!(1838); + collapsed_macro!(1839); + collapsed_macro!(1840); + collapsed_macro!(1841); + collapsed_macro!(1842); + collapsed_macro!(1843); + collapsed_macro!(1844); + collapsed_macro!(1845); + collapsed_macro!(1846); + collapsed_macro!(1847); + collapsed_macro!(1848); + collapsed_macro!(1849); + collapsed_macro!(1850); + collapsed_macro!(1851); + collapsed_macro!(1852); + collapsed_macro!(1853); + collapsed_macro!(1854); + collapsed_macro!(1855); + collapsed_macro!(1856); + collapsed_macro!(1857); + collapsed_macro!(1858); + collapsed_macro!(1859); + collapsed_macro!(1860); + collapsed_macro!(1861); + collapsed_macro!(1862); + collapsed_macro!(1863); + collapsed_macro!(1864); + collapsed_macro!(1865); + collapsed_macro!(1866); + collapsed_macro!(1867); + collapsed_macro!(1868); + collapsed_macro!(1869); + collapsed_macro!(1870); + collapsed_macro!(1871); + collapsed_macro!(1872); + collapsed_macro!(1873); + collapsed_macro!(1874); + collapsed_macro!(1875); + collapsed_macro!(1876); + collapsed_macro!(1877); + collapsed_macro!(1878); + collapsed_macro!(1879); + collapsed_macro!(1880); + collapsed_macro!(1881); + collapsed_macro!(1882); + collapsed_macro!(1883); + collapsed_macro!(1884); + collapsed_macro!(1885); + collapsed_macro!(1886); + collapsed_macro!(1887); + collapsed_macro!(1888); + collapsed_macro!(1889); + collapsed_macro!(1890); + collapsed_macro!(1891); + collapsed_macro!(1892); + collapsed_macro!(1893); + collapsed_macro!(1894); + collapsed_macro!(1895); + collapsed_macro!(1896); + collapsed_macro!(1897); + collapsed_macro!(1898); + collapsed_macro!(1899); + collapsed_macro!(1900); + collapsed_macro!(1901); + collapsed_macro!(1902); + collapsed_macro!(1903); + collapsed_macro!(1904); + collapsed_macro!(1905); + collapsed_macro!(1906); + collapsed_macro!(1907); + collapsed_macro!(1908); + collapsed_macro!(1909); + collapsed_macro!(1910); + collapsed_macro!(1911); + collapsed_macro!(1912); + collapsed_macro!(1913); + collapsed_macro!(1914); + collapsed_macro!(1915); + collapsed_macro!(1916); + collapsed_macro!(1917); + collapsed_macro!(1918); + collapsed_macro!(1919); + collapsed_macro!(1920); + collapsed_macro!(1921); + collapsed_macro!(1922); + collapsed_macro!(1923); + collapsed_macro!(1924); + collapsed_macro!(1925); + collapsed_macro!(1926); + collapsed_macro!(1927); + collapsed_macro!(1928); + collapsed_macro!(1929); + collapsed_macro!(1930); + collapsed_macro!(1931); + collapsed_macro!(1932); + collapsed_macro!(1933); + collapsed_macro!(1934); + collapsed_macro!(1935); + collapsed_macro!(1936); + collapsed_macro!(1937); + collapsed_macro!(1938); + collapsed_macro!(1939); + collapsed_macro!(1940); + collapsed_macro!(1941); + collapsed_macro!(1942); + collapsed_macro!(1943); + collapsed_macro!(1944); + collapsed_macro!(1945); + collapsed_macro!(1946); + collapsed_macro!(1947); + collapsed_macro!(1948); + collapsed_macro!(1949); + collapsed_macro!(1950); + collapsed_macro!(1951); + collapsed_macro!(1952); + collapsed_macro!(1953); + collapsed_macro!(1954); + collapsed_macro!(1955); + collapsed_macro!(1956); + collapsed_macro!(1957); + collapsed_macro!(1958); + collapsed_macro!(1959); + collapsed_macro!(1960); + collapsed_macro!(1961); + collapsed_macro!(1962); + collapsed_macro!(1963); + collapsed_macro!(1964); + collapsed_macro!(1965); + collapsed_macro!(1966); + collapsed_macro!(1967); + collapsed_macro!(1968); + collapsed_macro!(1969); + collapsed_macro!(1970); + collapsed_macro!(1971); + collapsed_macro!(1972); + collapsed_macro!(1973); + collapsed_macro!(1974); + collapsed_macro!(1975); + collapsed_macro!(1976); + collapsed_macro!(1977); + collapsed_macro!(1978); + collapsed_macro!(1979); + collapsed_macro!(1980); + collapsed_macro!(1981); + collapsed_macro!(1982); + collapsed_macro!(1983); + collapsed_macro!(1984); + collapsed_macro!(1985); + collapsed_macro!(1986); + collapsed_macro!(1987); + collapsed_macro!(1988); + collapsed_macro!(1989); + collapsed_macro!(1990); + collapsed_macro!(1991); + collapsed_macro!(1992); + collapsed_macro!(1993); + collapsed_macro!(1994); + collapsed_macro!(1995); + collapsed_macro!(1996); + collapsed_macro!(1997); + collapsed_macro!(1998); + collapsed_macro!(1999); + collapsed_macro!(2000); + collapsed_macro!(2001); + collapsed_macro!(2002); + collapsed_macro!(2003); + collapsed_macro!(2004); + collapsed_macro!(2005); + collapsed_macro!(2006); + collapsed_macro!(2007); + collapsed_macro!(2008); + collapsed_macro!(2009); + collapsed_macro!(2010); + collapsed_macro!(2011); + collapsed_macro!(2012); + collapsed_macro!(2013); + collapsed_macro!(2014); + collapsed_macro!(2015); + collapsed_macro!(2016); + collapsed_macro!(2017); + collapsed_macro!(2018); + collapsed_macro!(2019); + collapsed_macro!(2020); + collapsed_macro!(2021); + collapsed_macro!(2022); + collapsed_macro!(2023); + collapsed_macro!(2024); + collapsed_macro!(2025); + collapsed_macro!(2026); + collapsed_macro!(2027); + collapsed_macro!(2028); + collapsed_macro!(2029); + collapsed_macro!(2030); + collapsed_macro!(2031); + collapsed_macro!(2032); + collapsed_macro!(2033); + collapsed_macro!(2034); + collapsed_macro!(2035); + collapsed_macro!(2036); + collapsed_macro!(2037); + collapsed_macro!(2038); + collapsed_macro!(2039); + collapsed_macro!(2040); + collapsed_macro!(2041); + collapsed_macro!(2042); + collapsed_macro!(2043); + collapsed_macro!(2044); + collapsed_macro!(2045); + collapsed_macro!(2046); + collapsed_macro!(2047); + collapsed_macro!(2048); + collapsed_macro!(2049); + collapsed_macro!(2050); + collapsed_macro!(2051); + collapsed_macro!(2052); + collapsed_macro!(2053); + collapsed_macro!(2054); + collapsed_macro!(2055); + collapsed_macro!(2056); + collapsed_macro!(2057); + collapsed_macro!(2058); + collapsed_macro!(2059); + collapsed_macro!(2060); + collapsed_macro!(2061); + collapsed_macro!(2062); + collapsed_macro!(2063); + collapsed_macro!(2064); + collapsed_macro!(2065); + collapsed_macro!(2066); + collapsed_macro!(2067); + collapsed_macro!(2068); + collapsed_macro!(2069); + collapsed_macro!(2070); + collapsed_macro!(2071); + collapsed_macro!(2072); + collapsed_macro!(2073); + collapsed_macro!(2074); + collapsed_macro!(2075); + collapsed_macro!(2076); + collapsed_macro!(2077); + collapsed_macro!(2078); + collapsed_macro!(2079); + collapsed_macro!(2080); + collapsed_macro!(2081); + collapsed_macro!(2082); + collapsed_macro!(2083); + collapsed_macro!(2084); + collapsed_macro!(2085); + collapsed_macro!(2086); + collapsed_macro!(2087); + collapsed_macro!(2088); + collapsed_macro!(2089); + collapsed_macro!(2090); + collapsed_macro!(2091); + collapsed_macro!(2092); + collapsed_macro!(2093); + collapsed_macro!(2094); + collapsed_macro!(2095); + collapsed_macro!(2096); + collapsed_macro!(2097); + collapsed_macro!(2098); + collapsed_macro!(2099); + collapsed_macro!(2100); + collapsed_macro!(2101); + collapsed_macro!(2102); + collapsed_macro!(2103); + collapsed_macro!(2104); + collapsed_macro!(2105); + collapsed_macro!(2106); + collapsed_macro!(2107); + collapsed_macro!(2108); + collapsed_macro!(2109); + collapsed_macro!(2110); + collapsed_macro!(2111); + collapsed_macro!(2112); + collapsed_macro!(2113); + collapsed_macro!(2114); + collapsed_macro!(2115); + collapsed_macro!(2116); + collapsed_macro!(2117); + collapsed_macro!(2118); + collapsed_macro!(2119); + collapsed_macro!(2120); + collapsed_macro!(2121); + collapsed_macro!(2122); + collapsed_macro!(2123); + collapsed_macro!(2124); + collapsed_macro!(2125); + collapsed_macro!(2126); + collapsed_macro!(2127); + collapsed_macro!(2128); + collapsed_macro!(2129); + collapsed_macro!(2130); + collapsed_macro!(2131); + collapsed_macro!(2132); + collapsed_macro!(2133); + collapsed_macro!(2134); + collapsed_macro!(2135); + collapsed_macro!(2136); + collapsed_macro!(2137); + collapsed_macro!(2138); + collapsed_macro!(2139); + collapsed_macro!(2140); + collapsed_macro!(2141); + collapsed_macro!(2142); + collapsed_macro!(2143); + collapsed_macro!(2144); + collapsed_macro!(2145); + collapsed_macro!(2146); + collapsed_macro!(2147); + collapsed_macro!(2148); + collapsed_macro!(2149); + collapsed_macro!(2150); + collapsed_macro!(2151); + collapsed_macro!(2152); + collapsed_macro!(2153); + collapsed_macro!(2154); + collapsed_macro!(2155); + collapsed_macro!(2156); + collapsed_macro!(2157); + collapsed_macro!(2158); + collapsed_macro!(2159); + collapsed_macro!(2160); + collapsed_macro!(2161); + collapsed_macro!(2162); + collapsed_macro!(2163); + collapsed_macro!(2164); + collapsed_macro!(2165); + collapsed_macro!(2166); + collapsed_macro!(2167); + collapsed_macro!(2168); + collapsed_macro!(2169); + collapsed_macro!(2170); + collapsed_macro!(2171); + collapsed_macro!(2172); + collapsed_macro!(2173); + collapsed_macro!(2174); + collapsed_macro!(2175); + collapsed_macro!(2176); + collapsed_macro!(2177); + collapsed_macro!(2178); + collapsed_macro!(2179); + collapsed_macro!(2180); + collapsed_macro!(2181); + collapsed_macro!(2182); + collapsed_macro!(2183); + collapsed_macro!(2184); + collapsed_macro!(2185); + collapsed_macro!(2186); + collapsed_macro!(2187); + collapsed_macro!(2188); + collapsed_macro!(2189); + collapsed_macro!(2190); + collapsed_macro!(2191); + collapsed_macro!(2192); + collapsed_macro!(2193); + collapsed_macro!(2194); + collapsed_macro!(2195); + collapsed_macro!(2196); + collapsed_macro!(2197); + collapsed_macro!(2198); + collapsed_macro!(2199); + collapsed_macro!(2200); + collapsed_macro!(2201); + collapsed_macro!(2202); + collapsed_macro!(2203); + collapsed_macro!(2204); + collapsed_macro!(2205); + collapsed_macro!(2206); + collapsed_macro!(2207); + collapsed_macro!(2208); + collapsed_macro!(2209); + collapsed_macro!(2210); + collapsed_macro!(2211); + collapsed_macro!(2212); + collapsed_macro!(2213); + collapsed_macro!(2214); + collapsed_macro!(2215); + collapsed_macro!(2216); + collapsed_macro!(2217); + collapsed_macro!(2218); + collapsed_macro!(2219); + collapsed_macro!(2220); + collapsed_macro!(2221); + collapsed_macro!(2222); + collapsed_macro!(2223); + collapsed_macro!(2224); + collapsed_macro!(2225); + collapsed_macro!(2226); + collapsed_macro!(2227); + collapsed_macro!(2228); + collapsed_macro!(2229); + collapsed_macro!(2230); + collapsed_macro!(2231); + collapsed_macro!(2232); + collapsed_macro!(2233); + collapsed_macro!(2234); + collapsed_macro!(2235); + collapsed_macro!(2236); + collapsed_macro!(2237); + collapsed_macro!(2238); + collapsed_macro!(2239); + collapsed_macro!(2240); + collapsed_macro!(2241); + collapsed_macro!(2242); + collapsed_macro!(2243); + collapsed_macro!(2244); + collapsed_macro!(2245); + collapsed_macro!(2246); + collapsed_macro!(2247); + collapsed_macro!(2248); + collapsed_macro!(2249); + collapsed_macro!(2250); + collapsed_macro!(2251); + collapsed_macro!(2252); + collapsed_macro!(2253); + collapsed_macro!(2254); + collapsed_macro!(2255); + collapsed_macro!(2256); + collapsed_macro!(2257); + collapsed_macro!(2258); + collapsed_macro!(2259); + collapsed_macro!(2260); + collapsed_macro!(2261); + collapsed_macro!(2262); + collapsed_macro!(2263); + collapsed_macro!(2264); + collapsed_macro!(2265); + collapsed_macro!(2266); + collapsed_macro!(2267); + collapsed_macro!(2268); + collapsed_macro!(2269); + collapsed_macro!(2270); + collapsed_macro!(2271); + collapsed_macro!(2272); + collapsed_macro!(2273); + collapsed_macro!(2274); + collapsed_macro!(2275); + collapsed_macro!(2276); + collapsed_macro!(2277); + collapsed_macro!(2278); + collapsed_macro!(2279); + collapsed_macro!(2280); + collapsed_macro!(2281); + collapsed_macro!(2282); + collapsed_macro!(2283); + collapsed_macro!(2284); + collapsed_macro!(2285); + collapsed_macro!(2286); + collapsed_macro!(2287); + collapsed_macro!(2288); + collapsed_macro!(2289); + collapsed_macro!(2290); + collapsed_macro!(2291); + collapsed_macro!(2292); + collapsed_macro!(2293); + collapsed_macro!(2294); + collapsed_macro!(2295); + collapsed_macro!(2296); + collapsed_macro!(2297); + collapsed_macro!(2298); + collapsed_macro!(2299); + collapsed_macro!(2300); + collapsed_macro!(2301); + collapsed_macro!(2302); + collapsed_macro!(2303); + collapsed_macro!(2304); + collapsed_macro!(2305); + collapsed_macro!(2306); + collapsed_macro!(2307); + collapsed_macro!(2308); + collapsed_macro!(2309); + collapsed_macro!(2310); + collapsed_macro!(2311); + collapsed_macro!(2312); + collapsed_macro!(2313); + collapsed_macro!(2314); + collapsed_macro!(2315); + collapsed_macro!(2316); + collapsed_macro!(2317); + collapsed_macro!(2318); + collapsed_macro!(2319); + collapsed_macro!(2320); + collapsed_macro!(2321); + collapsed_macro!(2322); + collapsed_macro!(2323); + collapsed_macro!(2324); + collapsed_macro!(2325); + collapsed_macro!(2326); + collapsed_macro!(2327); + collapsed_macro!(2328); + collapsed_macro!(2329); + collapsed_macro!(2330); + collapsed_macro!(2331); + collapsed_macro!(2332); + collapsed_macro!(2333); + collapsed_macro!(2334); + collapsed_macro!(2335); + collapsed_macro!(2336); + collapsed_macro!(2337); + collapsed_macro!(2338); + collapsed_macro!(2339); + collapsed_macro!(2340); + collapsed_macro!(2341); + collapsed_macro!(2342); + collapsed_macro!(2343); + collapsed_macro!(2344); + collapsed_macro!(2345); + collapsed_macro!(2346); + collapsed_macro!(2347); + collapsed_macro!(2348); + collapsed_macro!(2349); + collapsed_macro!(2350); + collapsed_macro!(2351); + collapsed_macro!(2352); + collapsed_macro!(2353); + collapsed_macro!(2354); + collapsed_macro!(2355); + collapsed_macro!(2356); + collapsed_macro!(2357); + collapsed_macro!(2358); + collapsed_macro!(2359); + collapsed_macro!(2360); + collapsed_macro!(2361); + collapsed_macro!(2362); + collapsed_macro!(2363); + collapsed_macro!(2364); + collapsed_macro!(2365); + collapsed_macro!(2366); + collapsed_macro!(2367); + collapsed_macro!(2368); + collapsed_macro!(2369); + collapsed_macro!(2370); + collapsed_macro!(2371); + collapsed_macro!(2372); + collapsed_macro!(2373); + collapsed_macro!(2374); + collapsed_macro!(2375); + collapsed_macro!(2376); + collapsed_macro!(2377); + collapsed_macro!(2378); + collapsed_macro!(2379); + collapsed_macro!(2380); + collapsed_macro!(2381); + collapsed_macro!(2382); + collapsed_macro!(2383); + collapsed_macro!(2384); + collapsed_macro!(2385); + collapsed_macro!(2386); + collapsed_macro!(2387); + collapsed_macro!(2388); + collapsed_macro!(2389); + collapsed_macro!(2390); + collapsed_macro!(2391); + collapsed_macro!(2392); + collapsed_macro!(2393); + collapsed_macro!(2394); + collapsed_macro!(2395); + collapsed_macro!(2396); + collapsed_macro!(2397); + collapsed_macro!(2398); + collapsed_macro!(2399); + collapsed_macro!(2400); + collapsed_macro!(2401); + collapsed_macro!(2402); + collapsed_macro!(2403); + collapsed_macro!(2404); + collapsed_macro!(2405); + collapsed_macro!(2406); + collapsed_macro!(2407); + collapsed_macro!(2408); + collapsed_macro!(2409); + collapsed_macro!(2410); + collapsed_macro!(2411); + collapsed_macro!(2412); + collapsed_macro!(2413); + collapsed_macro!(2414); + collapsed_macro!(2415); + collapsed_macro!(2416); + collapsed_macro!(2417); + collapsed_macro!(2418); + collapsed_macro!(2419); + collapsed_macro!(2420); + collapsed_macro!(2421); + collapsed_macro!(2422); + collapsed_macro!(2423); + collapsed_macro!(2424); + collapsed_macro!(2425); + collapsed_macro!(2426); + collapsed_macro!(2427); + collapsed_macro!(2428); + collapsed_macro!(2429); + collapsed_macro!(2430); + collapsed_macro!(2431); + collapsed_macro!(2432); + collapsed_macro!(2433); + collapsed_macro!(2434); + collapsed_macro!(2435); + collapsed_macro!(2436); + collapsed_macro!(2437); + collapsed_macro!(2438); + collapsed_macro!(2439); + collapsed_macro!(2440); + collapsed_macro!(2441); + collapsed_macro!(2442); + collapsed_macro!(2443); + collapsed_macro!(2444); + collapsed_macro!(2445); + collapsed_macro!(2446); + collapsed_macro!(2447); + collapsed_macro!(2448); + collapsed_macro!(2449); + collapsed_macro!(2450); + collapsed_macro!(2451); + collapsed_macro!(2452); + collapsed_macro!(2453); + collapsed_macro!(2454); + collapsed_macro!(2455); + collapsed_macro!(2456); + collapsed_macro!(2457); + collapsed_macro!(2458); + collapsed_macro!(2459); + collapsed_macro!(2460); + collapsed_macro!(2461); + collapsed_macro!(2462); + collapsed_macro!(2463); + collapsed_macro!(2464); + collapsed_macro!(2465); + collapsed_macro!(2466); + collapsed_macro!(2467); + collapsed_macro!(2468); + collapsed_macro!(2469); + collapsed_macro!(2470); + collapsed_macro!(2471); + collapsed_macro!(2472); + collapsed_macro!(2473); + collapsed_macro!(2474); + collapsed_macro!(2475); + collapsed_macro!(2476); + collapsed_macro!(2477); + collapsed_macro!(2478); + collapsed_macro!(2479); + collapsed_macro!(2480); + collapsed_macro!(2481); + collapsed_macro!(2482); + collapsed_macro!(2483); + collapsed_macro!(2484); + collapsed_macro!(2485); + collapsed_macro!(2486); + collapsed_macro!(2487); + collapsed_macro!(2488); + collapsed_macro!(2489); + collapsed_macro!(2490); + collapsed_macro!(2491); + collapsed_macro!(2492); + collapsed_macro!(2493); + collapsed_macro!(2494); + collapsed_macro!(2495); + collapsed_macro!(2496); + collapsed_macro!(2497); + collapsed_macro!(2498); + collapsed_macro!(2499); + collapsed_macro!(2500); + collapsed_macro!(2501); + collapsed_macro!(2502); + collapsed_macro!(2503); + collapsed_macro!(2504); + collapsed_macro!(2505); + collapsed_macro!(2506); + collapsed_macro!(2507); + collapsed_macro!(2508); + collapsed_macro!(2509); + collapsed_macro!(2510); + collapsed_macro!(2511); + collapsed_macro!(2512); + collapsed_macro!(2513); + collapsed_macro!(2514); + collapsed_macro!(2515); + collapsed_macro!(2516); + collapsed_macro!(2517); + collapsed_macro!(2518); + collapsed_macro!(2519); + collapsed_macro!(2520); + collapsed_macro!(2521); + collapsed_macro!(2522); + collapsed_macro!(2523); + collapsed_macro!(2524); + collapsed_macro!(2525); + collapsed_macro!(2526); + collapsed_macro!(2527); + collapsed_macro!(2528); + collapsed_macro!(2529); + collapsed_macro!(2530); + collapsed_macro!(2531); + collapsed_macro!(2532); + collapsed_macro!(2533); + collapsed_macro!(2534); + collapsed_macro!(2535); + collapsed_macro!(2536); + collapsed_macro!(2537); + collapsed_macro!(2538); + collapsed_macro!(2539); + collapsed_macro!(2540); + collapsed_macro!(2541); + collapsed_macro!(2542); + collapsed_macro!(2543); + collapsed_macro!(2544); + collapsed_macro!(2545); + collapsed_macro!(2546); + collapsed_macro!(2547); + collapsed_macro!(2548); + collapsed_macro!(2549); + collapsed_macro!(2550); + collapsed_macro!(2551); + collapsed_macro!(2552); + collapsed_macro!(2553); + collapsed_macro!(2554); + collapsed_macro!(2555); + collapsed_macro!(2556); + collapsed_macro!(2557); + collapsed_macro!(2558); + collapsed_macro!(2559); + collapsed_macro!(2560); + collapsed_macro!(2561); + collapsed_macro!(2562); + collapsed_macro!(2563); + collapsed_macro!(2564); + collapsed_macro!(2565); + collapsed_macro!(2566); + collapsed_macro!(2567); + collapsed_macro!(2568); + collapsed_macro!(2569); + collapsed_macro!(2570); + collapsed_macro!(2571); + collapsed_macro!(2572); + collapsed_macro!(2573); + collapsed_macro!(2574); + collapsed_macro!(2575); + collapsed_macro!(2576); + collapsed_macro!(2577); + collapsed_macro!(2578); + collapsed_macro!(2579); + collapsed_macro!(2580); + collapsed_macro!(2581); + collapsed_macro!(2582); + collapsed_macro!(2583); + collapsed_macro!(2584); + collapsed_macro!(2585); + collapsed_macro!(2586); + collapsed_macro!(2587); + collapsed_macro!(2588); + collapsed_macro!(2589); + collapsed_macro!(2590); + collapsed_macro!(2591); + collapsed_macro!(2592); + collapsed_macro!(2593); + collapsed_macro!(2594); + collapsed_macro!(2595); + collapsed_macro!(2596); + collapsed_macro!(2597); + collapsed_macro!(2598); + collapsed_macro!(2599); + collapsed_macro!(2600); + collapsed_macro!(2601); + collapsed_macro!(2602); + collapsed_macro!(2603); + collapsed_macro!(2604); + collapsed_macro!(2605); + collapsed_macro!(2606); + collapsed_macro!(2607); + collapsed_macro!(2608); + collapsed_macro!(2609); + collapsed_macro!(2610); + collapsed_macro!(2611); + collapsed_macro!(2612); + collapsed_macro!(2613); + collapsed_macro!(2614); + collapsed_macro!(2615); + collapsed_macro!(2616); + collapsed_macro!(2617); + collapsed_macro!(2618); + collapsed_macro!(2619); + collapsed_macro!(2620); + collapsed_macro!(2621); + collapsed_macro!(2622); + collapsed_macro!(2623); + collapsed_macro!(2624); + collapsed_macro!(2625); + collapsed_macro!(2626); + collapsed_macro!(2627); + collapsed_macro!(2628); + collapsed_macro!(2629); + collapsed_macro!(2630); + collapsed_macro!(2631); + collapsed_macro!(2632); + collapsed_macro!(2633); + collapsed_macro!(2634); + collapsed_macro!(2635); + collapsed_macro!(2636); + collapsed_macro!(2637); + collapsed_macro!(2638); + collapsed_macro!(2639); + collapsed_macro!(2640); + collapsed_macro!(2641); + collapsed_macro!(2642); + collapsed_macro!(2643); + collapsed_macro!(2644); + collapsed_macro!(2645); + collapsed_macro!(2646); + collapsed_macro!(2647); + collapsed_macro!(2648); + collapsed_macro!(2649); + collapsed_macro!(2650); + collapsed_macro!(2651); + collapsed_macro!(2652); + collapsed_macro!(2653); + collapsed_macro!(2654); + collapsed_macro!(2655); + collapsed_macro!(2656); + collapsed_macro!(2657); + collapsed_macro!(2658); + collapsed_macro!(2659); + collapsed_macro!(2660); + collapsed_macro!(2661); + collapsed_macro!(2662); + collapsed_macro!(2663); + collapsed_macro!(2664); + collapsed_macro!(2665); + collapsed_macro!(2666); + collapsed_macro!(2667); + collapsed_macro!(2668); + collapsed_macro!(2669); + collapsed_macro!(2670); + collapsed_macro!(2671); + collapsed_macro!(2672); + collapsed_macro!(2673); + collapsed_macro!(2674); + collapsed_macro!(2675); + collapsed_macro!(2676); + collapsed_macro!(2677); + collapsed_macro!(2678); + collapsed_macro!(2679); + collapsed_macro!(2680); + collapsed_macro!(2681); + collapsed_macro!(2682); + collapsed_macro!(2683); + collapsed_macro!(2684); + collapsed_macro!(2685); + collapsed_macro!(2686); + collapsed_macro!(2687); + collapsed_macro!(2688); + collapsed_macro!(2689); + collapsed_macro!(2690); + collapsed_macro!(2691); + collapsed_macro!(2692); + collapsed_macro!(2693); + collapsed_macro!(2694); + collapsed_macro!(2695); + collapsed_macro!(2696); + collapsed_macro!(2697); + collapsed_macro!(2698); + collapsed_macro!(2699); + collapsed_macro!(2700); + collapsed_macro!(2701); + collapsed_macro!(2702); + collapsed_macro!(2703); + collapsed_macro!(2704); + collapsed_macro!(2705); + collapsed_macro!(2706); + collapsed_macro!(2707); + collapsed_macro!(2708); + collapsed_macro!(2709); + collapsed_macro!(2710); + collapsed_macro!(2711); + collapsed_macro!(2712); + collapsed_macro!(2713); + collapsed_macro!(2714); + collapsed_macro!(2715); + collapsed_macro!(2716); + collapsed_macro!(2717); + collapsed_macro!(2718); + collapsed_macro!(2719); + collapsed_macro!(2720); + collapsed_macro!(2721); + collapsed_macro!(2722); + collapsed_macro!(2723); + collapsed_macro!(2724); + collapsed_macro!(2725); + collapsed_macro!(2726); + collapsed_macro!(2727); + collapsed_macro!(2728); + collapsed_macro!(2729); + collapsed_macro!(2730); + collapsed_macro!(2731); + collapsed_macro!(2732); + collapsed_macro!(2733); + collapsed_macro!(2734); + collapsed_macro!(2735); + collapsed_macro!(2736); + collapsed_macro!(2737); + collapsed_macro!(2738); + collapsed_macro!(2739); + collapsed_macro!(2740); + collapsed_macro!(2741); + collapsed_macro!(2742); + collapsed_macro!(2743); + collapsed_macro!(2744); + collapsed_macro!(2745); + collapsed_macro!(2746); + collapsed_macro!(2747); + collapsed_macro!(2748); + collapsed_macro!(2749); + collapsed_macro!(2750); + collapsed_macro!(2751); + collapsed_macro!(2752); + collapsed_macro!(2753); + collapsed_macro!(2754); + collapsed_macro!(2755); + collapsed_macro!(2756); + collapsed_macro!(2757); + collapsed_macro!(2758); + collapsed_macro!(2759); + collapsed_macro!(2760); + collapsed_macro!(2761); + collapsed_macro!(2762); + collapsed_macro!(2763); + collapsed_macro!(2764); + collapsed_macro!(2765); + collapsed_macro!(2766); + collapsed_macro!(2767); + collapsed_macro!(2768); + collapsed_macro!(2769); + collapsed_macro!(2770); + collapsed_macro!(2771); + collapsed_macro!(2772); + collapsed_macro!(2773); + collapsed_macro!(2774); + collapsed_macro!(2775); + collapsed_macro!(2776); + collapsed_macro!(2777); + collapsed_macro!(2778); + collapsed_macro!(2779); + collapsed_macro!(2780); + collapsed_macro!(2781); + collapsed_macro!(2782); + collapsed_macro!(2783); + collapsed_macro!(2784); + collapsed_macro!(2785); + collapsed_macro!(2786); + collapsed_macro!(2787); + collapsed_macro!(2788); + collapsed_macro!(2789); + collapsed_macro!(2790); + collapsed_macro!(2791); + collapsed_macro!(2792); + collapsed_macro!(2793); + collapsed_macro!(2794); + collapsed_macro!(2795); + collapsed_macro!(2796); + collapsed_macro!(2797); + collapsed_macro!(2798); + collapsed_macro!(2799); + collapsed_macro!(2800); + collapsed_macro!(2801); + collapsed_macro!(2802); + collapsed_macro!(2803); + collapsed_macro!(2804); + collapsed_macro!(2805); + collapsed_macro!(2806); + collapsed_macro!(2807); + collapsed_macro!(2808); + collapsed_macro!(2809); + collapsed_macro!(2810); + collapsed_macro!(2811); + collapsed_macro!(2812); + collapsed_macro!(2813); + collapsed_macro!(2814); + collapsed_macro!(2815); + collapsed_macro!(2816); + collapsed_macro!(2817); + collapsed_macro!(2818); + collapsed_macro!(2819); + collapsed_macro!(2820); + collapsed_macro!(2821); + collapsed_macro!(2822); + collapsed_macro!(2823); + collapsed_macro!(2824); + collapsed_macro!(2825); + collapsed_macro!(2826); + collapsed_macro!(2827); + collapsed_macro!(2828); + collapsed_macro!(2829); + collapsed_macro!(2830); + collapsed_macro!(2831); + collapsed_macro!(2832); + collapsed_macro!(2833); + collapsed_macro!(2834); + collapsed_macro!(2835); + collapsed_macro!(2836); + collapsed_macro!(2837); + collapsed_macro!(2838); + collapsed_macro!(2839); + collapsed_macro!(2840); + collapsed_macro!(2841); + collapsed_macro!(2842); + collapsed_macro!(2843); + collapsed_macro!(2844); + collapsed_macro!(2845); + collapsed_macro!(2846); + collapsed_macro!(2847); + collapsed_macro!(2848); + collapsed_macro!(2849); + collapsed_macro!(2850); + collapsed_macro!(2851); + collapsed_macro!(2852); + collapsed_macro!(2853); + collapsed_macro!(2854); + collapsed_macro!(2855); + collapsed_macro!(2856); + collapsed_macro!(2857); + collapsed_macro!(2858); + collapsed_macro!(2859); + collapsed_macro!(2860); + collapsed_macro!(2861); + collapsed_macro!(2862); + collapsed_macro!(2863); + collapsed_macro!(2864); + collapsed_macro!(2865); + collapsed_macro!(2866); + collapsed_macro!(2867); + collapsed_macro!(2868); + collapsed_macro!(2869); + collapsed_macro!(2870); + collapsed_macro!(2871); + collapsed_macro!(2872); + collapsed_macro!(2873); + collapsed_macro!(2874); + collapsed_macro!(2875); + collapsed_macro!(2876); + collapsed_macro!(2877); + collapsed_macro!(2878); + collapsed_macro!(2879); + collapsed_macro!(2880); + collapsed_macro!(2881); + collapsed_macro!(2882); + collapsed_macro!(2883); + collapsed_macro!(2884); + collapsed_macro!(2885); + collapsed_macro!(2886); + collapsed_macro!(2887); + collapsed_macro!(2888); + collapsed_macro!(2889); + collapsed_macro!(2890); + collapsed_macro!(2891); + collapsed_macro!(2892); + collapsed_macro!(2893); + collapsed_macro!(2894); + collapsed_macro!(2895); + collapsed_macro!(2896); + collapsed_macro!(2897); + collapsed_macro!(2898); + collapsed_macro!(2899); + collapsed_macro!(2900); + collapsed_macro!(2901); + collapsed_macro!(2902); + collapsed_macro!(2903); + collapsed_macro!(2904); + collapsed_macro!(2905); + collapsed_macro!(2906); + collapsed_macro!(2907); + collapsed_macro!(2908); + collapsed_macro!(2909); + collapsed_macro!(2910); + collapsed_macro!(2911); + collapsed_macro!(2912); + collapsed_macro!(2913); + collapsed_macro!(2914); + collapsed_macro!(2915); + collapsed_macro!(2916); + collapsed_macro!(2917); + collapsed_macro!(2918); + collapsed_macro!(2919); + collapsed_macro!(2920); + collapsed_macro!(2921); + collapsed_macro!(2922); + collapsed_macro!(2923); + collapsed_macro!(2924); + collapsed_macro!(2925); + collapsed_macro!(2926); + collapsed_macro!(2927); + collapsed_macro!(2928); + collapsed_macro!(2929); + collapsed_macro!(2930); + collapsed_macro!(2931); + collapsed_macro!(2932); + collapsed_macro!(2933); + collapsed_macro!(2934); + collapsed_macro!(2935); + collapsed_macro!(2936); + collapsed_macro!(2937); + collapsed_macro!(2938); + collapsed_macro!(2939); + collapsed_macro!(2940); + collapsed_macro!(2941); + collapsed_macro!(2942); + collapsed_macro!(2943); + collapsed_macro!(2944); + collapsed_macro!(2945); + collapsed_macro!(2946); + collapsed_macro!(2947); + collapsed_macro!(2948); + collapsed_macro!(2949); + collapsed_macro!(2950); + collapsed_macro!(2951); + collapsed_macro!(2952); + collapsed_macro!(2953); + collapsed_macro!(2954); + collapsed_macro!(2955); + collapsed_macro!(2956); + collapsed_macro!(2957); + collapsed_macro!(2958); + collapsed_macro!(2959); + collapsed_macro!(2960); + collapsed_macro!(2961); + collapsed_macro!(2962); + collapsed_macro!(2963); + collapsed_macro!(2964); + collapsed_macro!(2965); + collapsed_macro!(2966); + collapsed_macro!(2967); + collapsed_macro!(2968); + collapsed_macro!(2969); + collapsed_macro!(2970); + collapsed_macro!(2971); + collapsed_macro!(2972); + collapsed_macro!(2973); + collapsed_macro!(2974); + collapsed_macro!(2975); + collapsed_macro!(2976); + collapsed_macro!(2977); + collapsed_macro!(2978); + collapsed_macro!(2979); + collapsed_macro!(2980); + collapsed_macro!(2981); + collapsed_macro!(2982); + collapsed_macro!(2983); + collapsed_macro!(2984); + collapsed_macro!(2985); + collapsed_macro!(2986); + collapsed_macro!(2987); + collapsed_macro!(2988); + collapsed_macro!(2989); + collapsed_macro!(2990); + collapsed_macro!(2991); + collapsed_macro!(2992); + collapsed_macro!(2993); + collapsed_macro!(2994); + collapsed_macro!(2995); + collapsed_macro!(2996); + collapsed_macro!(2997); + collapsed_macro!(2998); + collapsed_macro!(2999); + collapsed_macro!(3000); + collapsed_macro!(3001); + collapsed_macro!(3002); + collapsed_macro!(3003); + collapsed_macro!(3004); + collapsed_macro!(3005); + collapsed_macro!(3006); + collapsed_macro!(3007); + collapsed_macro!(3008); + collapsed_macro!(3009); + collapsed_macro!(3010); + collapsed_macro!(3011); + collapsed_macro!(3012); + collapsed_macro!(3013); + collapsed_macro!(3014); + collapsed_macro!(3015); + collapsed_macro!(3016); + collapsed_macro!(3017); + collapsed_macro!(3018); + collapsed_macro!(3019); + collapsed_macro!(3020); + collapsed_macro!(3021); + collapsed_macro!(3022); + collapsed_macro!(3023); + collapsed_macro!(3024); + collapsed_macro!(3025); + collapsed_macro!(3026); + collapsed_macro!(3027); + collapsed_macro!(3028); + collapsed_macro!(3029); + collapsed_macro!(3030); + collapsed_macro!(3031); + collapsed_macro!(3032); + collapsed_macro!(3033); + collapsed_macro!(3034); + collapsed_macro!(3035); + collapsed_macro!(3036); + collapsed_macro!(3037); + collapsed_macro!(3038); + collapsed_macro!(3039); + collapsed_macro!(3040); + collapsed_macro!(3041); + collapsed_macro!(3042); + collapsed_macro!(3043); + collapsed_macro!(3044); + collapsed_macro!(3045); + collapsed_macro!(3046); + collapsed_macro!(3047); + collapsed_macro!(3048); + collapsed_macro!(3049); + collapsed_macro!(3050); + collapsed_macro!(3051); + collapsed_macro!(3052); + collapsed_macro!(3053); + collapsed_macro!(3054); + collapsed_macro!(3055); + collapsed_macro!(3056); + collapsed_macro!(3057); + collapsed_macro!(3058); + collapsed_macro!(3059); + collapsed_macro!(3060); + collapsed_macro!(3061); + collapsed_macro!(3062); + collapsed_macro!(3063); + collapsed_macro!(3064); + collapsed_macro!(3065); + collapsed_macro!(3066); + collapsed_macro!(3067); + collapsed_macro!(3068); + collapsed_macro!(3069); + collapsed_macro!(3070); + collapsed_macro!(3071); + collapsed_macro!(3072); + collapsed_macro!(3073); + collapsed_macro!(3074); + collapsed_macro!(3075); + collapsed_macro!(3076); + collapsed_macro!(3077); + collapsed_macro!(3078); + collapsed_macro!(3079); + collapsed_macro!(3080); + collapsed_macro!(3081); + collapsed_macro!(3082); + collapsed_macro!(3083); + collapsed_macro!(3084); + collapsed_macro!(3085); + collapsed_macro!(3086); + collapsed_macro!(3087); + collapsed_macro!(3088); + collapsed_macro!(3089); + collapsed_macro!(3090); + collapsed_macro!(3091); + collapsed_macro!(3092); + collapsed_macro!(3093); + collapsed_macro!(3094); + collapsed_macro!(3095); + collapsed_macro!(3096); + collapsed_macro!(3097); + collapsed_macro!(3098); + collapsed_macro!(3099); + collapsed_macro!(3100); + collapsed_macro!(3101); + collapsed_macro!(3102); + collapsed_macro!(3103); + collapsed_macro!(3104); + collapsed_macro!(3105); + collapsed_macro!(3106); + collapsed_macro!(3107); + collapsed_macro!(3108); + collapsed_macro!(3109); + collapsed_macro!(3110); + collapsed_macro!(3111); + collapsed_macro!(3112); + collapsed_macro!(3113); + collapsed_macro!(3114); + collapsed_macro!(3115); + collapsed_macro!(3116); + collapsed_macro!(3117); + collapsed_macro!(3118); + collapsed_macro!(3119); + collapsed_macro!(3120); + collapsed_macro!(3121); + collapsed_macro!(3122); + collapsed_macro!(3123); + collapsed_macro!(3124); + collapsed_macro!(3125); + collapsed_macro!(3126); + collapsed_macro!(3127); + collapsed_macro!(3128); + collapsed_macro!(3129); + collapsed_macro!(3130); + collapsed_macro!(3131); + collapsed_macro!(3132); + collapsed_macro!(3133); + collapsed_macro!(3134); + collapsed_macro!(3135); + collapsed_macro!(3136); + collapsed_macro!(3137); + collapsed_macro!(3138); + collapsed_macro!(3139); + collapsed_macro!(3140); + collapsed_macro!(3141); + collapsed_macro!(3142); + collapsed_macro!(3143); + collapsed_macro!(3144); + collapsed_macro!(3145); + collapsed_macro!(3146); + collapsed_macro!(3147); + collapsed_macro!(3148); + collapsed_macro!(3149); + collapsed_macro!(3150); + collapsed_macro!(3151); + collapsed_macro!(3152); + collapsed_macro!(3153); + collapsed_macro!(3154); + collapsed_macro!(3155); + collapsed_macro!(3156); + collapsed_macro!(3157); + collapsed_macro!(3158); + collapsed_macro!(3159); + collapsed_macro!(3160); + collapsed_macro!(3161); + collapsed_macro!(3162); + collapsed_macro!(3163); + collapsed_macro!(3164); + collapsed_macro!(3165); + collapsed_macro!(3166); + collapsed_macro!(3167); + collapsed_macro!(3168); + collapsed_macro!(3169); + collapsed_macro!(3170); + collapsed_macro!(3171); + collapsed_macro!(3172); + collapsed_macro!(3173); + collapsed_macro!(3174); + collapsed_macro!(3175); + collapsed_macro!(3176); + collapsed_macro!(3177); + collapsed_macro!(3178); + collapsed_macro!(3179); + collapsed_macro!(3180); + collapsed_macro!(3181); + collapsed_macro!(3182); + collapsed_macro!(3183); + collapsed_macro!(3184); + collapsed_macro!(3185); + collapsed_macro!(3186); + collapsed_macro!(3187); + collapsed_macro!(3188); + collapsed_macro!(3189); + collapsed_macro!(3190); + collapsed_macro!(3191); + collapsed_macro!(3192); + collapsed_macro!(3193); + collapsed_macro!(3194); + collapsed_macro!(3195); + collapsed_macro!(3196); + collapsed_macro!(3197); + collapsed_macro!(3198); + collapsed_macro!(3199); + collapsed_macro!(3200); + collapsed_macro!(3201); + collapsed_macro!(3202); + collapsed_macro!(3203); + collapsed_macro!(3204); + collapsed_macro!(3205); + collapsed_macro!(3206); + collapsed_macro!(3207); + collapsed_macro!(3208); + collapsed_macro!(3209); + collapsed_macro!(3210); + collapsed_macro!(3211); + collapsed_macro!(3212); + collapsed_macro!(3213); + collapsed_macro!(3214); + collapsed_macro!(3215); + collapsed_macro!(3216); + collapsed_macro!(3217); + collapsed_macro!(3218); + collapsed_macro!(3219); + collapsed_macro!(3220); + collapsed_macro!(3221); + collapsed_macro!(3222); + collapsed_macro!(3223); + collapsed_macro!(3224); + collapsed_macro!(3225); + collapsed_macro!(3226); + collapsed_macro!(3227); + collapsed_macro!(3228); + collapsed_macro!(3229); + collapsed_macro!(3230); + collapsed_macro!(3231); + collapsed_macro!(3232); + collapsed_macro!(3233); + collapsed_macro!(3234); + collapsed_macro!(3235); + collapsed_macro!(3236); + collapsed_macro!(3237); + collapsed_macro!(3238); + collapsed_macro!(3239); + collapsed_macro!(3240); + collapsed_macro!(3241); + collapsed_macro!(3242); + collapsed_macro!(3243); + collapsed_macro!(3244); + collapsed_macro!(3245); + collapsed_macro!(3246); + collapsed_macro!(3247); + collapsed_macro!(3248); + collapsed_macro!(3249); + collapsed_macro!(3250); + collapsed_macro!(3251); + collapsed_macro!(3252); + collapsed_macro!(3253); + collapsed_macro!(3254); + collapsed_macro!(3255); + collapsed_macro!(3256); + collapsed_macro!(3257); + collapsed_macro!(3258); + collapsed_macro!(3259); + collapsed_macro!(3260); + collapsed_macro!(3261); + collapsed_macro!(3262); + collapsed_macro!(3263); + collapsed_macro!(3264); + collapsed_macro!(3265); + collapsed_macro!(3266); + collapsed_macro!(3267); + collapsed_macro!(3268); + collapsed_macro!(3269); + collapsed_macro!(3270); + collapsed_macro!(3271); + collapsed_macro!(3272); + collapsed_macro!(3273); + collapsed_macro!(3274); + collapsed_macro!(3275); + collapsed_macro!(3276); + collapsed_macro!(3277); + collapsed_macro!(3278); + collapsed_macro!(3279); + collapsed_macro!(3280); + collapsed_macro!(3281); + collapsed_macro!(3282); + collapsed_macro!(3283); + collapsed_macro!(3284); + collapsed_macro!(3285); + collapsed_macro!(3286); + collapsed_macro!(3287); + collapsed_macro!(3288); + collapsed_macro!(3289); + collapsed_macro!(3290); + collapsed_macro!(3291); + collapsed_macro!(3292); + collapsed_macro!(3293); + collapsed_macro!(3294); + collapsed_macro!(3295); + collapsed_macro!(3296); + collapsed_macro!(3297); + collapsed_macro!(3298); + collapsed_macro!(3299); + collapsed_macro!(3300); + collapsed_macro!(3301); + collapsed_macro!(3302); + collapsed_macro!(3303); + collapsed_macro!(3304); + collapsed_macro!(3305); + collapsed_macro!(3306); + collapsed_macro!(3307); + collapsed_macro!(3308); + collapsed_macro!(3309); + collapsed_macro!(3310); + collapsed_macro!(3311); + collapsed_macro!(3312); + collapsed_macro!(3313); + collapsed_macro!(3314); + collapsed_macro!(3315); + collapsed_macro!(3316); + collapsed_macro!(3317); + collapsed_macro!(3318); + collapsed_macro!(3319); + collapsed_macro!(3320); + collapsed_macro!(3321); + collapsed_macro!(3322); + collapsed_macro!(3323); + collapsed_macro!(3324); + collapsed_macro!(3325); + collapsed_macro!(3326); + collapsed_macro!(3327); + collapsed_macro!(3328); + collapsed_macro!(3329); + collapsed_macro!(3330); + collapsed_macro!(3331); + collapsed_macro!(3332); + collapsed_macro!(3333); + collapsed_macro!(3334); + collapsed_macro!(3335); + collapsed_macro!(3336); + collapsed_macro!(3337); + collapsed_macro!(3338); + collapsed_macro!(3339); + collapsed_macro!(3340); + collapsed_macro!(3341); + collapsed_macro!(3342); + collapsed_macro!(3343); + collapsed_macro!(3344); + collapsed_macro!(3345); + collapsed_macro!(3346); + collapsed_macro!(3347); + collapsed_macro!(3348); + collapsed_macro!(3349); + collapsed_macro!(3350); + collapsed_macro!(3351); + collapsed_macro!(3352); + collapsed_macro!(3353); + collapsed_macro!(3354); + collapsed_macro!(3355); + collapsed_macro!(3356); + collapsed_macro!(3357); + collapsed_macro!(3358); + collapsed_macro!(3359); + collapsed_macro!(3360); + collapsed_macro!(3361); + collapsed_macro!(3362); + collapsed_macro!(3363); + collapsed_macro!(3364); + collapsed_macro!(3365); + collapsed_macro!(3366); + collapsed_macro!(3367); + collapsed_macro!(3368); + collapsed_macro!(3369); + collapsed_macro!(3370); + collapsed_macro!(3371); + collapsed_macro!(3372); + collapsed_macro!(3373); + collapsed_macro!(3374); + collapsed_macro!(3375); + collapsed_macro!(3376); + collapsed_macro!(3377); + collapsed_macro!(3378); + collapsed_macro!(3379); + collapsed_macro!(3380); + collapsed_macro!(3381); + collapsed_macro!(3382); + collapsed_macro!(3383); + collapsed_macro!(3384); + collapsed_macro!(3385); + collapsed_macro!(3386); + collapsed_macro!(3387); + collapsed_macro!(3388); + collapsed_macro!(3389); + collapsed_macro!(3390); + collapsed_macro!(3391); + collapsed_macro!(3392); + collapsed_macro!(3393); + collapsed_macro!(3394); + collapsed_macro!(3395); + collapsed_macro!(3396); + collapsed_macro!(3397); + collapsed_macro!(3398); + collapsed_macro!(3399); + collapsed_macro!(3400); + collapsed_macro!(3401); + collapsed_macro!(3402); + collapsed_macro!(3403); + collapsed_macro!(3404); + collapsed_macro!(3405); + collapsed_macro!(3406); + collapsed_macro!(3407); + collapsed_macro!(3408); + collapsed_macro!(3409); + collapsed_macro!(3410); + collapsed_macro!(3411); + collapsed_macro!(3412); + collapsed_macro!(3413); + collapsed_macro!(3414); + collapsed_macro!(3415); + collapsed_macro!(3416); + collapsed_macro!(3417); + collapsed_macro!(3418); + collapsed_macro!(3419); + collapsed_macro!(3420); + collapsed_macro!(3421); + collapsed_macro!(3422); + collapsed_macro!(3423); + collapsed_macro!(3424); + collapsed_macro!(3425); + collapsed_macro!(3426); + collapsed_macro!(3427); + collapsed_macro!(3428); + collapsed_macro!(3429); + collapsed_macro!(3430); + collapsed_macro!(3431); + collapsed_macro!(3432); + collapsed_macro!(3433); + collapsed_macro!(3434); + collapsed_macro!(3435); + collapsed_macro!(3436); + collapsed_macro!(3437); + collapsed_macro!(3438); + collapsed_macro!(3439); + collapsed_macro!(3440); + collapsed_macro!(3441); + collapsed_macro!(3442); + collapsed_macro!(3443); + collapsed_macro!(3444); + collapsed_macro!(3445); + collapsed_macro!(3446); + collapsed_macro!(3447); + collapsed_macro!(3448); + collapsed_macro!(3449); + collapsed_macro!(3450); + collapsed_macro!(3451); + collapsed_macro!(3452); + collapsed_macro!(3453); + collapsed_macro!(3454); + collapsed_macro!(3455); + collapsed_macro!(3456); + collapsed_macro!(3457); + collapsed_macro!(3458); + collapsed_macro!(3459); + collapsed_macro!(3460); + collapsed_macro!(3461); + collapsed_macro!(3462); + collapsed_macro!(3463); + collapsed_macro!(3464); + collapsed_macro!(3465); + collapsed_macro!(3466); + collapsed_macro!(3467); + collapsed_macro!(3468); + collapsed_macro!(3469); + collapsed_macro!(3470); + collapsed_macro!(3471); + collapsed_macro!(3472); + collapsed_macro!(3473); + collapsed_macro!(3474); + collapsed_macro!(3475); + collapsed_macro!(3476); + collapsed_macro!(3477); + collapsed_macro!(3478); + collapsed_macro!(3479); + collapsed_macro!(3480); + collapsed_macro!(3481); + collapsed_macro!(3482); + collapsed_macro!(3483); + collapsed_macro!(3484); + collapsed_macro!(3485); + collapsed_macro!(3486); + collapsed_macro!(3487); + collapsed_macro!(3488); + collapsed_macro!(3489); + collapsed_macro!(3490); + collapsed_macro!(3491); + collapsed_macro!(3492); + collapsed_macro!(3493); + collapsed_macro!(3494); + collapsed_macro!(3495); + collapsed_macro!(3496); + collapsed_macro!(3497); + collapsed_macro!(3498); + collapsed_macro!(3499); + collapsed_macro!(3500); + collapsed_macro!(3501); + collapsed_macro!(3502); + collapsed_macro!(3503); + collapsed_macro!(3504); + collapsed_macro!(3505); + collapsed_macro!(3506); + collapsed_macro!(3507); + collapsed_macro!(3508); + collapsed_macro!(3509); + collapsed_macro!(3510); + collapsed_macro!(3511); + collapsed_macro!(3512); + collapsed_macro!(3513); + collapsed_macro!(3514); + collapsed_macro!(3515); + collapsed_macro!(3516); + collapsed_macro!(3517); + collapsed_macro!(3518); + collapsed_macro!(3519); + collapsed_macro!(3520); + collapsed_macro!(3521); + collapsed_macro!(3522); + collapsed_macro!(3523); + collapsed_macro!(3524); + collapsed_macro!(3525); + collapsed_macro!(3526); + collapsed_macro!(3527); + collapsed_macro!(3528); + collapsed_macro!(3529); + collapsed_macro!(3530); + collapsed_macro!(3531); + collapsed_macro!(3532); + collapsed_macro!(3533); + collapsed_macro!(3534); + collapsed_macro!(3535); + collapsed_macro!(3536); + collapsed_macro!(3537); + collapsed_macro!(3538); + collapsed_macro!(3539); + collapsed_macro!(3540); + collapsed_macro!(3541); + collapsed_macro!(3542); + collapsed_macro!(3543); + collapsed_macro!(3544); + collapsed_macro!(3545); + collapsed_macro!(3546); + collapsed_macro!(3547); + collapsed_macro!(3548); + collapsed_macro!(3549); + collapsed_macro!(3550); + collapsed_macro!(3551); + collapsed_macro!(3552); + collapsed_macro!(3553); + collapsed_macro!(3554); + collapsed_macro!(3555); + collapsed_macro!(3556); + collapsed_macro!(3557); + collapsed_macro!(3558); + collapsed_macro!(3559); + collapsed_macro!(3560); + collapsed_macro!(3561); + collapsed_macro!(3562); + collapsed_macro!(3563); + collapsed_macro!(3564); + collapsed_macro!(3565); + collapsed_macro!(3566); + collapsed_macro!(3567); + collapsed_macro!(3568); + collapsed_macro!(3569); + collapsed_macro!(3570); + collapsed_macro!(3571); + collapsed_macro!(3572); + collapsed_macro!(3573); + collapsed_macro!(3574); + collapsed_macro!(3575); + collapsed_macro!(3576); + collapsed_macro!(3577); + collapsed_macro!(3578); + collapsed_macro!(3579); + collapsed_macro!(3580); + collapsed_macro!(3581); + collapsed_macro!(3582); + collapsed_macro!(3583); + collapsed_macro!(3584); + collapsed_macro!(3585); + collapsed_macro!(3586); + collapsed_macro!(3587); + collapsed_macro!(3588); + collapsed_macro!(3589); + collapsed_macro!(3590); + collapsed_macro!(3591); + collapsed_macro!(3592); + collapsed_macro!(3593); + collapsed_macro!(3594); + collapsed_macro!(3595); + collapsed_macro!(3596); + collapsed_macro!(3597); + collapsed_macro!(3598); + collapsed_macro!(3599); + collapsed_macro!(3600); + collapsed_macro!(3601); + collapsed_macro!(3602); + collapsed_macro!(3603); + collapsed_macro!(3604); + collapsed_macro!(3605); + collapsed_macro!(3606); + collapsed_macro!(3607); + collapsed_macro!(3608); + collapsed_macro!(3609); + collapsed_macro!(3610); + collapsed_macro!(3611); + collapsed_macro!(3612); + collapsed_macro!(3613); + collapsed_macro!(3614); + collapsed_macro!(3615); + collapsed_macro!(3616); + collapsed_macro!(3617); + collapsed_macro!(3618); + collapsed_macro!(3619); + collapsed_macro!(3620); + collapsed_macro!(3621); + collapsed_macro!(3622); + collapsed_macro!(3623); + collapsed_macro!(3624); + collapsed_macro!(3625); + collapsed_macro!(3626); + collapsed_macro!(3627); + collapsed_macro!(3628); + collapsed_macro!(3629); + collapsed_macro!(3630); + collapsed_macro!(3631); + collapsed_macro!(3632); + collapsed_macro!(3633); + collapsed_macro!(3634); + collapsed_macro!(3635); + collapsed_macro!(3636); + collapsed_macro!(3637); + collapsed_macro!(3638); + collapsed_macro!(3639); + collapsed_macro!(3640); + collapsed_macro!(3641); + collapsed_macro!(3642); + collapsed_macro!(3643); + collapsed_macro!(3644); + collapsed_macro!(3645); + collapsed_macro!(3646); + collapsed_macro!(3647); + collapsed_macro!(3648); + collapsed_macro!(3649); + collapsed_macro!(3650); + collapsed_macro!(3651); + collapsed_macro!(3652); + collapsed_macro!(3653); + collapsed_macro!(3654); + collapsed_macro!(3655); + collapsed_macro!(3656); + collapsed_macro!(3657); + collapsed_macro!(3658); + collapsed_macro!(3659); + collapsed_macro!(3660); + collapsed_macro!(3661); + collapsed_macro!(3662); + collapsed_macro!(3663); + collapsed_macro!(3664); + collapsed_macro!(3665); + collapsed_macro!(3666); + collapsed_macro!(3667); + collapsed_macro!(3668); + collapsed_macro!(3669); + collapsed_macro!(3670); + collapsed_macro!(3671); + collapsed_macro!(3672); + collapsed_macro!(3673); + collapsed_macro!(3674); + collapsed_macro!(3675); + collapsed_macro!(3676); + collapsed_macro!(3677); + collapsed_macro!(3678); + collapsed_macro!(3679); + collapsed_macro!(3680); + collapsed_macro!(3681); + collapsed_macro!(3682); + collapsed_macro!(3683); + collapsed_macro!(3684); + collapsed_macro!(3685); + collapsed_macro!(3686); + collapsed_macro!(3687); + collapsed_macro!(3688); + collapsed_macro!(3689); + collapsed_macro!(3690); + collapsed_macro!(3691); + collapsed_macro!(3692); + collapsed_macro!(3693); + collapsed_macro!(3694); + collapsed_macro!(3695); + collapsed_macro!(3696); + collapsed_macro!(3697); + collapsed_macro!(3698); + collapsed_macro!(3699); + collapsed_macro!(3700); + collapsed_macro!(3701); + collapsed_macro!(3702); + collapsed_macro!(3703); + collapsed_macro!(3704); + collapsed_macro!(3705); + collapsed_macro!(3706); + collapsed_macro!(3707); + collapsed_macro!(3708); + collapsed_macro!(3709); + collapsed_macro!(3710); + collapsed_macro!(3711); + collapsed_macro!(3712); + collapsed_macro!(3713); + collapsed_macro!(3714); + collapsed_macro!(3715); + collapsed_macro!(3716); + collapsed_macro!(3717); + collapsed_macro!(3718); + collapsed_macro!(3719); + collapsed_macro!(3720); + collapsed_macro!(3721); + collapsed_macro!(3722); + collapsed_macro!(3723); + collapsed_macro!(3724); + collapsed_macro!(3725); + collapsed_macro!(3726); + collapsed_macro!(3727); + collapsed_macro!(3728); + collapsed_macro!(3729); + collapsed_macro!(3730); + collapsed_macro!(3731); + collapsed_macro!(3732); + collapsed_macro!(3733); + collapsed_macro!(3734); + collapsed_macro!(3735); + collapsed_macro!(3736); + collapsed_macro!(3737); + collapsed_macro!(3738); + collapsed_macro!(3739); + collapsed_macro!(3740); + collapsed_macro!(3741); + collapsed_macro!(3742); + collapsed_macro!(3743); + collapsed_macro!(3744); + collapsed_macro!(3745); + collapsed_macro!(3746); + collapsed_macro!(3747); + collapsed_macro!(3748); + collapsed_macro!(3749); + collapsed_macro!(3750); + collapsed_macro!(3751); + collapsed_macro!(3752); + collapsed_macro!(3753); + collapsed_macro!(3754); + collapsed_macro!(3755); + collapsed_macro!(3756); + collapsed_macro!(3757); + collapsed_macro!(3758); + collapsed_macro!(3759); + collapsed_macro!(3760); + collapsed_macro!(3761); + collapsed_macro!(3762); + collapsed_macro!(3763); + collapsed_macro!(3764); + collapsed_macro!(3765); + collapsed_macro!(3766); + collapsed_macro!(3767); + collapsed_macro!(3768); + collapsed_macro!(3769); + collapsed_macro!(3770); + collapsed_macro!(3771); + collapsed_macro!(3772); + collapsed_macro!(3773); + collapsed_macro!(3774); + collapsed_macro!(3775); + collapsed_macro!(3776); + collapsed_macro!(3777); + collapsed_macro!(3778); + collapsed_macro!(3779); + collapsed_macro!(3780); + collapsed_macro!(3781); + collapsed_macro!(3782); + collapsed_macro!(3783); + collapsed_macro!(3784); + collapsed_macro!(3785); + collapsed_macro!(3786); + collapsed_macro!(3787); + collapsed_macro!(3788); + collapsed_macro!(3789); + collapsed_macro!(3790); + collapsed_macro!(3791); + collapsed_macro!(3792); + collapsed_macro!(3793); + collapsed_macro!(3794); + collapsed_macro!(3795); + collapsed_macro!(3796); + collapsed_macro!(3797); + collapsed_macro!(3798); + collapsed_macro!(3799); + collapsed_macro!(3800); + collapsed_macro!(3801); + collapsed_macro!(3802); + collapsed_macro!(3803); + collapsed_macro!(3804); + collapsed_macro!(3805); + collapsed_macro!(3806); + collapsed_macro!(3807); + collapsed_macro!(3808); + collapsed_macro!(3809); + collapsed_macro!(3810); + collapsed_macro!(3811); + collapsed_macro!(3812); + collapsed_macro!(3813); + collapsed_macro!(3814); + collapsed_macro!(3815); + collapsed_macro!(3816); + collapsed_macro!(3817); + collapsed_macro!(3818); + collapsed_macro!(3819); + collapsed_macro!(3820); + collapsed_macro!(3821); + collapsed_macro!(3822); + collapsed_macro!(3823); + collapsed_macro!(3824); + collapsed_macro!(3825); + collapsed_macro!(3826); + collapsed_macro!(3827); + collapsed_macro!(3828); + collapsed_macro!(3829); + collapsed_macro!(3830); + collapsed_macro!(3831); + collapsed_macro!(3832); + collapsed_macro!(3833); + collapsed_macro!(3834); + collapsed_macro!(3835); + collapsed_macro!(3836); + collapsed_macro!(3837); + collapsed_macro!(3838); + collapsed_macro!(3839); + collapsed_macro!(3840); + collapsed_macro!(3841); + collapsed_macro!(3842); + collapsed_macro!(3843); + collapsed_macro!(3844); + collapsed_macro!(3845); + collapsed_macro!(3846); + collapsed_macro!(3847); + collapsed_macro!(3848); + collapsed_macro!(3849); + collapsed_macro!(3850); + collapsed_macro!(3851); + collapsed_macro!(3852); + collapsed_macro!(3853); + collapsed_macro!(3854); + collapsed_macro!(3855); + collapsed_macro!(3856); + collapsed_macro!(3857); + collapsed_macro!(3858); + collapsed_macro!(3859); + collapsed_macro!(3860); + collapsed_macro!(3861); + collapsed_macro!(3862); + collapsed_macro!(3863); + collapsed_macro!(3864); + collapsed_macro!(3865); + collapsed_macro!(3866); + collapsed_macro!(3867); + collapsed_macro!(3868); + collapsed_macro!(3869); + collapsed_macro!(3870); + collapsed_macro!(3871); + collapsed_macro!(3872); + collapsed_macro!(3873); + collapsed_macro!(3874); + collapsed_macro!(3875); + collapsed_macro!(3876); + collapsed_macro!(3877); + collapsed_macro!(3878); + collapsed_macro!(3879); + collapsed_macro!(3880); + collapsed_macro!(3881); + collapsed_macro!(3882); + collapsed_macro!(3883); + collapsed_macro!(3884); + collapsed_macro!(3885); + collapsed_macro!(3886); + collapsed_macro!(3887); + collapsed_macro!(3888); + collapsed_macro!(3889); + collapsed_macro!(3890); + collapsed_macro!(3891); + collapsed_macro!(3892); + collapsed_macro!(3893); + collapsed_macro!(3894); + collapsed_macro!(3895); + collapsed_macro!(3896); + collapsed_macro!(3897); + collapsed_macro!(3898); + collapsed_macro!(3899); + collapsed_macro!(3900); + collapsed_macro!(3901); + collapsed_macro!(3902); + collapsed_macro!(3903); + collapsed_macro!(3904); + collapsed_macro!(3905); + collapsed_macro!(3906); + collapsed_macro!(3907); + collapsed_macro!(3908); + collapsed_macro!(3909); + collapsed_macro!(3910); + collapsed_macro!(3911); + collapsed_macro!(3912); + collapsed_macro!(3913); + collapsed_macro!(3914); + collapsed_macro!(3915); + collapsed_macro!(3916); + collapsed_macro!(3917); + collapsed_macro!(3918); + collapsed_macro!(3919); + collapsed_macro!(3920); + collapsed_macro!(3921); + collapsed_macro!(3922); + collapsed_macro!(3923); + collapsed_macro!(3924); + collapsed_macro!(3925); + collapsed_macro!(3926); + collapsed_macro!(3927); + collapsed_macro!(3928); + collapsed_macro!(3929); + collapsed_macro!(3930); + collapsed_macro!(3931); + collapsed_macro!(3932); + collapsed_macro!(3933); + collapsed_macro!(3934); + collapsed_macro!(3935); + collapsed_macro!(3936); + collapsed_macro!(3937); + collapsed_macro!(3938); + collapsed_macro!(3939); + collapsed_macro!(3940); + collapsed_macro!(3941); + collapsed_macro!(3942); + collapsed_macro!(3943); + collapsed_macro!(3944); + collapsed_macro!(3945); + collapsed_macro!(3946); + collapsed_macro!(3947); + collapsed_macro!(3948); + collapsed_macro!(3949); + collapsed_macro!(3950); + collapsed_macro!(3951); + collapsed_macro!(3952); + collapsed_macro!(3953); + collapsed_macro!(3954); + collapsed_macro!(3955); + collapsed_macro!(3956); + collapsed_macro!(3957); + collapsed_macro!(3958); + collapsed_macro!(3959); + collapsed_macro!(3960); + collapsed_macro!(3961); + collapsed_macro!(3962); + collapsed_macro!(3963); + collapsed_macro!(3964); + collapsed_macro!(3965); + collapsed_macro!(3966); + collapsed_macro!(3967); + collapsed_macro!(3968); + collapsed_macro!(3969); + collapsed_macro!(3970); + collapsed_macro!(3971); + collapsed_macro!(3972); + collapsed_macro!(3973); + collapsed_macro!(3974); + collapsed_macro!(3975); + collapsed_macro!(3976); + collapsed_macro!(3977); + collapsed_macro!(3978); + collapsed_macro!(3979); + collapsed_macro!(3980); + collapsed_macro!(3981); + collapsed_macro!(3982); + collapsed_macro!(3983); + collapsed_macro!(3984); + collapsed_macro!(3985); + collapsed_macro!(3986); + collapsed_macro!(3987); + collapsed_macro!(3988); + collapsed_macro!(3989); + collapsed_macro!(3990); + collapsed_macro!(3991); + collapsed_macro!(3992); + collapsed_macro!(3993); + collapsed_macro!(3994); + collapsed_macro!(3995); + collapsed_macro!(3996); + collapsed_macro!(3997); + collapsed_macro!(3998); + collapsed_macro!(3999); + collapsed_macro!(4000); + collapsed_macro!(4001); + collapsed_macro!(4002); + collapsed_macro!(4003); + collapsed_macro!(4004); + collapsed_macro!(4005); + collapsed_macro!(4006); + collapsed_macro!(4007); + collapsed_macro!(4008); + collapsed_macro!(4009); + collapsed_macro!(4010); + collapsed_macro!(4011); + collapsed_macro!(4012); + collapsed_macro!(4013); + collapsed_macro!(4014); + collapsed_macro!(4015); + collapsed_macro!(4016); + collapsed_macro!(4017); + collapsed_macro!(4018); + collapsed_macro!(4019); + collapsed_macro!(4020); + collapsed_macro!(4021); + collapsed_macro!(4022); + collapsed_macro!(4023); + collapsed_macro!(4024); + collapsed_macro!(4025); + collapsed_macro!(4026); + collapsed_macro!(4027); + collapsed_macro!(4028); + collapsed_macro!(4029); + collapsed_macro!(4030); + collapsed_macro!(4031); + collapsed_macro!(4032); + collapsed_macro!(4033); + collapsed_macro!(4034); + collapsed_macro!(4035); + collapsed_macro!(4036); + collapsed_macro!(4037); + collapsed_macro!(4038); + collapsed_macro!(4039); + collapsed_macro!(4040); + collapsed_macro!(4041); + collapsed_macro!(4042); + collapsed_macro!(4043); + collapsed_macro!(4044); + collapsed_macro!(4045); + collapsed_macro!(4046); + collapsed_macro!(4047); + collapsed_macro!(4048); + collapsed_macro!(4049); + collapsed_macro!(4050); + collapsed_macro!(4051); + collapsed_macro!(4052); + collapsed_macro!(4053); + collapsed_macro!(4054); + collapsed_macro!(4055); + collapsed_macro!(4056); + collapsed_macro!(4057); + collapsed_macro!(4058); + collapsed_macro!(4059); + collapsed_macro!(4060); + collapsed_macro!(4061); + collapsed_macro!(4062); + collapsed_macro!(4063); + collapsed_macro!(4064); + collapsed_macro!(4065); + collapsed_macro!(4066); + collapsed_macro!(4067); + collapsed_macro!(4068); + collapsed_macro!(4069); + collapsed_macro!(4070); + collapsed_macro!(4071); + collapsed_macro!(4072); + collapsed_macro!(4073); + collapsed_macro!(4074); + collapsed_macro!(4075); + collapsed_macro!(4076); + collapsed_macro!(4077); + collapsed_macro!(4078); + collapsed_macro!(4079); + collapsed_macro!(4080); + collapsed_macro!(4081); + collapsed_macro!(4082); + collapsed_macro!(4083); + collapsed_macro!(4084); + collapsed_macro!(4085); + collapsed_macro!(4086); + collapsed_macro!(4087); + collapsed_macro!(4088); + collapsed_macro!(4089); + collapsed_macro!(4090); + collapsed_macro!(4091); + collapsed_macro!(4092); + collapsed_macro!(4093); + collapsed_macro!(4094); + collapsed_macro!(4095); + collapsed_macro!(4096); + collapsed_macro!(4097); +} + +fn main() { + collapsed_debuginfo(); +} diff --git a/tests/ui/debuginfo/debuginfo-inline-callsite-location-macro-2.rs b/tests/ui/debuginfo/debuginfo-inline-callsite-location-macro-2.rs new file mode 100644 index 00000000000..3696ed37a20 --- /dev/null +++ b/tests/ui/debuginfo/debuginfo-inline-callsite-location-macro-2.rs @@ -0,0 +1,4122 @@ +//@ check-pass +//@ compile-flags: -Cdebuginfo=2 -Copt-level=0 -Zmir-enable-passes=+Inline +//@ ignore-msvc +// ignore-tidy-filelength + +#[derive(Default)] +struct Something {} + +macro_rules! simple_macro { + ($code:expr) => { + // Important to use a function here, so it can be inlined + // at the MIR stage. + Something::default() + } +} + +fn uncollapsed_debuginfo() { + // LLVM allows 12 bits for encoding discriminators, so 4096+1 calls to a + // MIR-inlined function will exhaust it. At that point we will start + // dropping debug info (and tracing::warn!). + simple_macro!(1); + simple_macro!(2); + simple_macro!(3); + simple_macro!(4); + simple_macro!(5); + simple_macro!(6); + simple_macro!(7); + simple_macro!(8); + simple_macro!(9); + simple_macro!(10); + simple_macro!(11); + simple_macro!(12); + simple_macro!(13); + simple_macro!(14); + simple_macro!(15); + simple_macro!(16); + simple_macro!(17); + simple_macro!(18); + simple_macro!(19); + simple_macro!(20); + simple_macro!(21); + simple_macro!(22); + simple_macro!(23); + simple_macro!(24); + simple_macro!(25); + simple_macro!(26); + simple_macro!(27); + simple_macro!(28); + simple_macro!(29); + simple_macro!(30); + simple_macro!(31); + simple_macro!(32); + simple_macro!(33); + simple_macro!(34); + simple_macro!(35); + simple_macro!(36); + simple_macro!(37); + simple_macro!(38); + simple_macro!(39); + simple_macro!(40); + simple_macro!(41); + simple_macro!(42); + simple_macro!(43); + simple_macro!(44); + simple_macro!(45); + simple_macro!(46); + simple_macro!(47); + simple_macro!(48); + simple_macro!(49); + simple_macro!(50); + simple_macro!(51); + simple_macro!(52); + simple_macro!(53); + simple_macro!(54); + simple_macro!(55); + simple_macro!(56); + simple_macro!(57); + simple_macro!(58); + simple_macro!(59); + simple_macro!(60); + simple_macro!(61); + simple_macro!(62); + simple_macro!(63); + simple_macro!(64); + simple_macro!(65); + simple_macro!(66); + simple_macro!(67); + simple_macro!(68); + simple_macro!(69); + simple_macro!(70); + simple_macro!(71); + simple_macro!(72); + simple_macro!(73); + simple_macro!(74); + simple_macro!(75); + simple_macro!(76); + simple_macro!(77); + simple_macro!(78); + simple_macro!(79); + simple_macro!(80); + simple_macro!(81); + simple_macro!(82); + simple_macro!(83); + simple_macro!(84); + simple_macro!(85); + simple_macro!(86); + simple_macro!(87); + simple_macro!(88); + simple_macro!(89); + simple_macro!(90); + simple_macro!(91); + simple_macro!(92); + simple_macro!(93); + simple_macro!(94); + simple_macro!(95); + simple_macro!(96); + simple_macro!(97); + simple_macro!(98); + simple_macro!(99); + simple_macro!(100); + simple_macro!(101); + simple_macro!(102); + simple_macro!(103); + simple_macro!(104); + simple_macro!(105); + simple_macro!(106); + simple_macro!(107); + simple_macro!(108); + simple_macro!(109); + simple_macro!(110); + simple_macro!(111); + simple_macro!(112); + simple_macro!(113); + simple_macro!(114); + simple_macro!(115); + simple_macro!(116); + simple_macro!(117); + simple_macro!(118); + simple_macro!(119); + simple_macro!(120); + simple_macro!(121); + simple_macro!(122); + simple_macro!(123); + simple_macro!(124); + simple_macro!(125); + simple_macro!(126); + simple_macro!(127); + simple_macro!(128); + simple_macro!(129); + simple_macro!(130); + simple_macro!(131); + simple_macro!(132); + simple_macro!(133); + simple_macro!(134); + simple_macro!(135); + simple_macro!(136); + simple_macro!(137); + simple_macro!(138); + simple_macro!(139); + simple_macro!(140); + simple_macro!(141); + simple_macro!(142); + simple_macro!(143); + simple_macro!(144); + simple_macro!(145); + simple_macro!(146); + simple_macro!(147); + simple_macro!(148); + simple_macro!(149); + simple_macro!(150); + simple_macro!(151); + simple_macro!(152); + simple_macro!(153); + simple_macro!(154); + simple_macro!(155); + simple_macro!(156); + simple_macro!(157); + simple_macro!(158); + simple_macro!(159); + simple_macro!(160); + simple_macro!(161); + simple_macro!(162); + simple_macro!(163); + simple_macro!(164); + simple_macro!(165); + simple_macro!(166); + simple_macro!(167); + simple_macro!(168); + simple_macro!(169); + simple_macro!(170); + simple_macro!(171); + simple_macro!(172); + simple_macro!(173); + simple_macro!(174); + simple_macro!(175); + simple_macro!(176); + simple_macro!(177); + simple_macro!(178); + simple_macro!(179); + simple_macro!(180); + simple_macro!(181); + simple_macro!(182); + simple_macro!(183); + simple_macro!(184); + simple_macro!(185); + simple_macro!(186); + simple_macro!(187); + simple_macro!(188); + simple_macro!(189); + simple_macro!(190); + simple_macro!(191); + simple_macro!(192); + simple_macro!(193); + simple_macro!(194); + simple_macro!(195); + simple_macro!(196); + simple_macro!(197); + simple_macro!(198); + simple_macro!(199); + simple_macro!(200); + simple_macro!(201); + simple_macro!(202); + simple_macro!(203); + simple_macro!(204); + simple_macro!(205); + simple_macro!(206); + simple_macro!(207); + simple_macro!(208); + simple_macro!(209); + simple_macro!(210); + simple_macro!(211); + simple_macro!(212); + simple_macro!(213); + simple_macro!(214); + simple_macro!(215); + simple_macro!(216); + simple_macro!(217); + simple_macro!(218); + simple_macro!(219); + simple_macro!(220); + simple_macro!(221); + simple_macro!(222); + simple_macro!(223); + simple_macro!(224); + simple_macro!(225); + simple_macro!(226); + simple_macro!(227); + simple_macro!(228); + simple_macro!(229); + simple_macro!(230); + simple_macro!(231); + simple_macro!(232); + simple_macro!(233); + simple_macro!(234); + simple_macro!(235); + simple_macro!(236); + simple_macro!(237); + simple_macro!(238); + simple_macro!(239); + simple_macro!(240); + simple_macro!(241); + simple_macro!(242); + simple_macro!(243); + simple_macro!(244); + simple_macro!(245); + simple_macro!(246); + simple_macro!(247); + simple_macro!(248); + simple_macro!(249); + simple_macro!(250); + simple_macro!(251); + simple_macro!(252); + simple_macro!(253); + simple_macro!(254); + simple_macro!(255); + simple_macro!(256); + simple_macro!(257); + simple_macro!(258); + simple_macro!(259); + simple_macro!(260); + simple_macro!(261); + simple_macro!(262); + simple_macro!(263); + simple_macro!(264); + simple_macro!(265); + simple_macro!(266); + simple_macro!(267); + simple_macro!(268); + simple_macro!(269); + simple_macro!(270); + simple_macro!(271); + simple_macro!(272); + simple_macro!(273); + simple_macro!(274); + simple_macro!(275); + simple_macro!(276); + simple_macro!(277); + simple_macro!(278); + simple_macro!(279); + simple_macro!(280); + simple_macro!(281); + simple_macro!(282); + simple_macro!(283); + simple_macro!(284); + simple_macro!(285); + simple_macro!(286); + simple_macro!(287); + simple_macro!(288); + simple_macro!(289); + simple_macro!(290); + simple_macro!(291); + simple_macro!(292); + simple_macro!(293); + simple_macro!(294); + simple_macro!(295); + simple_macro!(296); + simple_macro!(297); + simple_macro!(298); + simple_macro!(299); + simple_macro!(300); + simple_macro!(301); + simple_macro!(302); + simple_macro!(303); + simple_macro!(304); + simple_macro!(305); + simple_macro!(306); + simple_macro!(307); + simple_macro!(308); + simple_macro!(309); + simple_macro!(310); + simple_macro!(311); + simple_macro!(312); + simple_macro!(313); + simple_macro!(314); + simple_macro!(315); + simple_macro!(316); + simple_macro!(317); + simple_macro!(318); + simple_macro!(319); + simple_macro!(320); + simple_macro!(321); + simple_macro!(322); + simple_macro!(323); + simple_macro!(324); + simple_macro!(325); + simple_macro!(326); + simple_macro!(327); + simple_macro!(328); + simple_macro!(329); + simple_macro!(330); + simple_macro!(331); + simple_macro!(332); + simple_macro!(333); + simple_macro!(334); + simple_macro!(335); + simple_macro!(336); + simple_macro!(337); + simple_macro!(338); + simple_macro!(339); + simple_macro!(340); + simple_macro!(341); + simple_macro!(342); + simple_macro!(343); + simple_macro!(344); + simple_macro!(345); + simple_macro!(346); + simple_macro!(347); + simple_macro!(348); + simple_macro!(349); + simple_macro!(350); + simple_macro!(351); + simple_macro!(352); + simple_macro!(353); + simple_macro!(354); + simple_macro!(355); + simple_macro!(356); + simple_macro!(357); + simple_macro!(358); + simple_macro!(359); + simple_macro!(360); + simple_macro!(361); + simple_macro!(362); + simple_macro!(363); + simple_macro!(364); + simple_macro!(365); + simple_macro!(366); + simple_macro!(367); + simple_macro!(368); + simple_macro!(369); + simple_macro!(370); + simple_macro!(371); + simple_macro!(372); + simple_macro!(373); + simple_macro!(374); + simple_macro!(375); + simple_macro!(376); + simple_macro!(377); + simple_macro!(378); + simple_macro!(379); + simple_macro!(380); + simple_macro!(381); + simple_macro!(382); + simple_macro!(383); + simple_macro!(384); + simple_macro!(385); + simple_macro!(386); + simple_macro!(387); + simple_macro!(388); + simple_macro!(389); + simple_macro!(390); + simple_macro!(391); + simple_macro!(392); + simple_macro!(393); + simple_macro!(394); + simple_macro!(395); + simple_macro!(396); + simple_macro!(397); + simple_macro!(398); + simple_macro!(399); + simple_macro!(400); + simple_macro!(401); + simple_macro!(402); + simple_macro!(403); + simple_macro!(404); + simple_macro!(405); + simple_macro!(406); + simple_macro!(407); + simple_macro!(408); + simple_macro!(409); + simple_macro!(410); + simple_macro!(411); + simple_macro!(412); + simple_macro!(413); + simple_macro!(414); + simple_macro!(415); + simple_macro!(416); + simple_macro!(417); + simple_macro!(418); + simple_macro!(419); + simple_macro!(420); + simple_macro!(421); + simple_macro!(422); + simple_macro!(423); + simple_macro!(424); + simple_macro!(425); + simple_macro!(426); + simple_macro!(427); + simple_macro!(428); + simple_macro!(429); + simple_macro!(430); + simple_macro!(431); + simple_macro!(432); + simple_macro!(433); + simple_macro!(434); + simple_macro!(435); + simple_macro!(436); + simple_macro!(437); + simple_macro!(438); + simple_macro!(439); + simple_macro!(440); + simple_macro!(441); + simple_macro!(442); + simple_macro!(443); + simple_macro!(444); + simple_macro!(445); + simple_macro!(446); + simple_macro!(447); + simple_macro!(448); + simple_macro!(449); + simple_macro!(450); + simple_macro!(451); + simple_macro!(452); + simple_macro!(453); + simple_macro!(454); + simple_macro!(455); + simple_macro!(456); + simple_macro!(457); + simple_macro!(458); + simple_macro!(459); + simple_macro!(460); + simple_macro!(461); + simple_macro!(462); + simple_macro!(463); + simple_macro!(464); + simple_macro!(465); + simple_macro!(466); + simple_macro!(467); + simple_macro!(468); + simple_macro!(469); + simple_macro!(470); + simple_macro!(471); + simple_macro!(472); + simple_macro!(473); + simple_macro!(474); + simple_macro!(475); + simple_macro!(476); + simple_macro!(477); + simple_macro!(478); + simple_macro!(479); + simple_macro!(480); + simple_macro!(481); + simple_macro!(482); + simple_macro!(483); + simple_macro!(484); + simple_macro!(485); + simple_macro!(486); + simple_macro!(487); + simple_macro!(488); + simple_macro!(489); + simple_macro!(490); + simple_macro!(491); + simple_macro!(492); + simple_macro!(493); + simple_macro!(494); + simple_macro!(495); + simple_macro!(496); + simple_macro!(497); + simple_macro!(498); + simple_macro!(499); + simple_macro!(500); + simple_macro!(501); + simple_macro!(502); + simple_macro!(503); + simple_macro!(504); + simple_macro!(505); + simple_macro!(506); + simple_macro!(507); + simple_macro!(508); + simple_macro!(509); + simple_macro!(510); + simple_macro!(511); + simple_macro!(512); + simple_macro!(513); + simple_macro!(514); + simple_macro!(515); + simple_macro!(516); + simple_macro!(517); + simple_macro!(518); + simple_macro!(519); + simple_macro!(520); + simple_macro!(521); + simple_macro!(522); + simple_macro!(523); + simple_macro!(524); + simple_macro!(525); + simple_macro!(526); + simple_macro!(527); + simple_macro!(528); + simple_macro!(529); + simple_macro!(530); + simple_macro!(531); + simple_macro!(532); + simple_macro!(533); + simple_macro!(534); + simple_macro!(535); + simple_macro!(536); + simple_macro!(537); + simple_macro!(538); + simple_macro!(539); + simple_macro!(540); + simple_macro!(541); + simple_macro!(542); + simple_macro!(543); + simple_macro!(544); + simple_macro!(545); + simple_macro!(546); + simple_macro!(547); + simple_macro!(548); + simple_macro!(549); + simple_macro!(550); + simple_macro!(551); + simple_macro!(552); + simple_macro!(553); + simple_macro!(554); + simple_macro!(555); + simple_macro!(556); + simple_macro!(557); + simple_macro!(558); + simple_macro!(559); + simple_macro!(560); + simple_macro!(561); + simple_macro!(562); + simple_macro!(563); + simple_macro!(564); + simple_macro!(565); + simple_macro!(566); + simple_macro!(567); + simple_macro!(568); + simple_macro!(569); + simple_macro!(570); + simple_macro!(571); + simple_macro!(572); + simple_macro!(573); + simple_macro!(574); + simple_macro!(575); + simple_macro!(576); + simple_macro!(577); + simple_macro!(578); + simple_macro!(579); + simple_macro!(580); + simple_macro!(581); + simple_macro!(582); + simple_macro!(583); + simple_macro!(584); + simple_macro!(585); + simple_macro!(586); + simple_macro!(587); + simple_macro!(588); + simple_macro!(589); + simple_macro!(590); + simple_macro!(591); + simple_macro!(592); + simple_macro!(593); + simple_macro!(594); + simple_macro!(595); + simple_macro!(596); + simple_macro!(597); + simple_macro!(598); + simple_macro!(599); + simple_macro!(600); + simple_macro!(601); + simple_macro!(602); + simple_macro!(603); + simple_macro!(604); + simple_macro!(605); + simple_macro!(606); + simple_macro!(607); + simple_macro!(608); + simple_macro!(609); + simple_macro!(610); + simple_macro!(611); + simple_macro!(612); + simple_macro!(613); + simple_macro!(614); + simple_macro!(615); + simple_macro!(616); + simple_macro!(617); + simple_macro!(618); + simple_macro!(619); + simple_macro!(620); + simple_macro!(621); + simple_macro!(622); + simple_macro!(623); + simple_macro!(624); + simple_macro!(625); + simple_macro!(626); + simple_macro!(627); + simple_macro!(628); + simple_macro!(629); + simple_macro!(630); + simple_macro!(631); + simple_macro!(632); + simple_macro!(633); + simple_macro!(634); + simple_macro!(635); + simple_macro!(636); + simple_macro!(637); + simple_macro!(638); + simple_macro!(639); + simple_macro!(640); + simple_macro!(641); + simple_macro!(642); + simple_macro!(643); + simple_macro!(644); + simple_macro!(645); + simple_macro!(646); + simple_macro!(647); + simple_macro!(648); + simple_macro!(649); + simple_macro!(650); + simple_macro!(651); + simple_macro!(652); + simple_macro!(653); + simple_macro!(654); + simple_macro!(655); + simple_macro!(656); + simple_macro!(657); + simple_macro!(658); + simple_macro!(659); + simple_macro!(660); + simple_macro!(661); + simple_macro!(662); + simple_macro!(663); + simple_macro!(664); + simple_macro!(665); + simple_macro!(666); + simple_macro!(667); + simple_macro!(668); + simple_macro!(669); + simple_macro!(670); + simple_macro!(671); + simple_macro!(672); + simple_macro!(673); + simple_macro!(674); + simple_macro!(675); + simple_macro!(676); + simple_macro!(677); + simple_macro!(678); + simple_macro!(679); + simple_macro!(680); + simple_macro!(681); + simple_macro!(682); + simple_macro!(683); + simple_macro!(684); + simple_macro!(685); + simple_macro!(686); + simple_macro!(687); + simple_macro!(688); + simple_macro!(689); + simple_macro!(690); + simple_macro!(691); + simple_macro!(692); + simple_macro!(693); + simple_macro!(694); + simple_macro!(695); + simple_macro!(696); + simple_macro!(697); + simple_macro!(698); + simple_macro!(699); + simple_macro!(700); + simple_macro!(701); + simple_macro!(702); + simple_macro!(703); + simple_macro!(704); + simple_macro!(705); + simple_macro!(706); + simple_macro!(707); + simple_macro!(708); + simple_macro!(709); + simple_macro!(710); + simple_macro!(711); + simple_macro!(712); + simple_macro!(713); + simple_macro!(714); + simple_macro!(715); + simple_macro!(716); + simple_macro!(717); + simple_macro!(718); + simple_macro!(719); + simple_macro!(720); + simple_macro!(721); + simple_macro!(722); + simple_macro!(723); + simple_macro!(724); + simple_macro!(725); + simple_macro!(726); + simple_macro!(727); + simple_macro!(728); + simple_macro!(729); + simple_macro!(730); + simple_macro!(731); + simple_macro!(732); + simple_macro!(733); + simple_macro!(734); + simple_macro!(735); + simple_macro!(736); + simple_macro!(737); + simple_macro!(738); + simple_macro!(739); + simple_macro!(740); + simple_macro!(741); + simple_macro!(742); + simple_macro!(743); + simple_macro!(744); + simple_macro!(745); + simple_macro!(746); + simple_macro!(747); + simple_macro!(748); + simple_macro!(749); + simple_macro!(750); + simple_macro!(751); + simple_macro!(752); + simple_macro!(753); + simple_macro!(754); + simple_macro!(755); + simple_macro!(756); + simple_macro!(757); + simple_macro!(758); + simple_macro!(759); + simple_macro!(760); + simple_macro!(761); + simple_macro!(762); + simple_macro!(763); + simple_macro!(764); + simple_macro!(765); + simple_macro!(766); + simple_macro!(767); + simple_macro!(768); + simple_macro!(769); + simple_macro!(770); + simple_macro!(771); + simple_macro!(772); + simple_macro!(773); + simple_macro!(774); + simple_macro!(775); + simple_macro!(776); + simple_macro!(777); + simple_macro!(778); + simple_macro!(779); + simple_macro!(780); + simple_macro!(781); + simple_macro!(782); + simple_macro!(783); + simple_macro!(784); + simple_macro!(785); + simple_macro!(786); + simple_macro!(787); + simple_macro!(788); + simple_macro!(789); + simple_macro!(790); + simple_macro!(791); + simple_macro!(792); + simple_macro!(793); + simple_macro!(794); + simple_macro!(795); + simple_macro!(796); + simple_macro!(797); + simple_macro!(798); + simple_macro!(799); + simple_macro!(800); + simple_macro!(801); + simple_macro!(802); + simple_macro!(803); + simple_macro!(804); + simple_macro!(805); + simple_macro!(806); + simple_macro!(807); + simple_macro!(808); + simple_macro!(809); + simple_macro!(810); + simple_macro!(811); + simple_macro!(812); + simple_macro!(813); + simple_macro!(814); + simple_macro!(815); + simple_macro!(816); + simple_macro!(817); + simple_macro!(818); + simple_macro!(819); + simple_macro!(820); + simple_macro!(821); + simple_macro!(822); + simple_macro!(823); + simple_macro!(824); + simple_macro!(825); + simple_macro!(826); + simple_macro!(827); + simple_macro!(828); + simple_macro!(829); + simple_macro!(830); + simple_macro!(831); + simple_macro!(832); + simple_macro!(833); + simple_macro!(834); + simple_macro!(835); + simple_macro!(836); + simple_macro!(837); + simple_macro!(838); + simple_macro!(839); + simple_macro!(840); + simple_macro!(841); + simple_macro!(842); + simple_macro!(843); + simple_macro!(844); + simple_macro!(845); + simple_macro!(846); + simple_macro!(847); + simple_macro!(848); + simple_macro!(849); + simple_macro!(850); + simple_macro!(851); + simple_macro!(852); + simple_macro!(853); + simple_macro!(854); + simple_macro!(855); + simple_macro!(856); + simple_macro!(857); + simple_macro!(858); + simple_macro!(859); + simple_macro!(860); + simple_macro!(861); + simple_macro!(862); + simple_macro!(863); + simple_macro!(864); + simple_macro!(865); + simple_macro!(866); + simple_macro!(867); + simple_macro!(868); + simple_macro!(869); + simple_macro!(870); + simple_macro!(871); + simple_macro!(872); + simple_macro!(873); + simple_macro!(874); + simple_macro!(875); + simple_macro!(876); + simple_macro!(877); + simple_macro!(878); + simple_macro!(879); + simple_macro!(880); + simple_macro!(881); + simple_macro!(882); + simple_macro!(883); + simple_macro!(884); + simple_macro!(885); + simple_macro!(886); + simple_macro!(887); + simple_macro!(888); + simple_macro!(889); + simple_macro!(890); + simple_macro!(891); + simple_macro!(892); + simple_macro!(893); + simple_macro!(894); + simple_macro!(895); + simple_macro!(896); + simple_macro!(897); + simple_macro!(898); + simple_macro!(899); + simple_macro!(900); + simple_macro!(901); + simple_macro!(902); + simple_macro!(903); + simple_macro!(904); + simple_macro!(905); + simple_macro!(906); + simple_macro!(907); + simple_macro!(908); + simple_macro!(909); + simple_macro!(910); + simple_macro!(911); + simple_macro!(912); + simple_macro!(913); + simple_macro!(914); + simple_macro!(915); + simple_macro!(916); + simple_macro!(917); + simple_macro!(918); + simple_macro!(919); + simple_macro!(920); + simple_macro!(921); + simple_macro!(922); + simple_macro!(923); + simple_macro!(924); + simple_macro!(925); + simple_macro!(926); + simple_macro!(927); + simple_macro!(928); + simple_macro!(929); + simple_macro!(930); + simple_macro!(931); + simple_macro!(932); + simple_macro!(933); + simple_macro!(934); + simple_macro!(935); + simple_macro!(936); + simple_macro!(937); + simple_macro!(938); + simple_macro!(939); + simple_macro!(940); + simple_macro!(941); + simple_macro!(942); + simple_macro!(943); + simple_macro!(944); + simple_macro!(945); + simple_macro!(946); + simple_macro!(947); + simple_macro!(948); + simple_macro!(949); + simple_macro!(950); + simple_macro!(951); + simple_macro!(952); + simple_macro!(953); + simple_macro!(954); + simple_macro!(955); + simple_macro!(956); + simple_macro!(957); + simple_macro!(958); + simple_macro!(959); + simple_macro!(960); + simple_macro!(961); + simple_macro!(962); + simple_macro!(963); + simple_macro!(964); + simple_macro!(965); + simple_macro!(966); + simple_macro!(967); + simple_macro!(968); + simple_macro!(969); + simple_macro!(970); + simple_macro!(971); + simple_macro!(972); + simple_macro!(973); + simple_macro!(974); + simple_macro!(975); + simple_macro!(976); + simple_macro!(977); + simple_macro!(978); + simple_macro!(979); + simple_macro!(980); + simple_macro!(981); + simple_macro!(982); + simple_macro!(983); + simple_macro!(984); + simple_macro!(985); + simple_macro!(986); + simple_macro!(987); + simple_macro!(988); + simple_macro!(989); + simple_macro!(990); + simple_macro!(991); + simple_macro!(992); + simple_macro!(993); + simple_macro!(994); + simple_macro!(995); + simple_macro!(996); + simple_macro!(997); + simple_macro!(998); + simple_macro!(999); + simple_macro!(1000); + simple_macro!(1001); + simple_macro!(1002); + simple_macro!(1003); + simple_macro!(1004); + simple_macro!(1005); + simple_macro!(1006); + simple_macro!(1007); + simple_macro!(1008); + simple_macro!(1009); + simple_macro!(1010); + simple_macro!(1011); + simple_macro!(1012); + simple_macro!(1013); + simple_macro!(1014); + simple_macro!(1015); + simple_macro!(1016); + simple_macro!(1017); + simple_macro!(1018); + simple_macro!(1019); + simple_macro!(1020); + simple_macro!(1021); + simple_macro!(1022); + simple_macro!(1023); + simple_macro!(1024); + simple_macro!(1025); + simple_macro!(1026); + simple_macro!(1027); + simple_macro!(1028); + simple_macro!(1029); + simple_macro!(1030); + simple_macro!(1031); + simple_macro!(1032); + simple_macro!(1033); + simple_macro!(1034); + simple_macro!(1035); + simple_macro!(1036); + simple_macro!(1037); + simple_macro!(1038); + simple_macro!(1039); + simple_macro!(1040); + simple_macro!(1041); + simple_macro!(1042); + simple_macro!(1043); + simple_macro!(1044); + simple_macro!(1045); + simple_macro!(1046); + simple_macro!(1047); + simple_macro!(1048); + simple_macro!(1049); + simple_macro!(1050); + simple_macro!(1051); + simple_macro!(1052); + simple_macro!(1053); + simple_macro!(1054); + simple_macro!(1055); + simple_macro!(1056); + simple_macro!(1057); + simple_macro!(1058); + simple_macro!(1059); + simple_macro!(1060); + simple_macro!(1061); + simple_macro!(1062); + simple_macro!(1063); + simple_macro!(1064); + simple_macro!(1065); + simple_macro!(1066); + simple_macro!(1067); + simple_macro!(1068); + simple_macro!(1069); + simple_macro!(1070); + simple_macro!(1071); + simple_macro!(1072); + simple_macro!(1073); + simple_macro!(1074); + simple_macro!(1075); + simple_macro!(1076); + simple_macro!(1077); + simple_macro!(1078); + simple_macro!(1079); + simple_macro!(1080); + simple_macro!(1081); + simple_macro!(1082); + simple_macro!(1083); + simple_macro!(1084); + simple_macro!(1085); + simple_macro!(1086); + simple_macro!(1087); + simple_macro!(1088); + simple_macro!(1089); + simple_macro!(1090); + simple_macro!(1091); + simple_macro!(1092); + simple_macro!(1093); + simple_macro!(1094); + simple_macro!(1095); + simple_macro!(1096); + simple_macro!(1097); + simple_macro!(1098); + simple_macro!(1099); + simple_macro!(1100); + simple_macro!(1101); + simple_macro!(1102); + simple_macro!(1103); + simple_macro!(1104); + simple_macro!(1105); + simple_macro!(1106); + simple_macro!(1107); + simple_macro!(1108); + simple_macro!(1109); + simple_macro!(1110); + simple_macro!(1111); + simple_macro!(1112); + simple_macro!(1113); + simple_macro!(1114); + simple_macro!(1115); + simple_macro!(1116); + simple_macro!(1117); + simple_macro!(1118); + simple_macro!(1119); + simple_macro!(1120); + simple_macro!(1121); + simple_macro!(1122); + simple_macro!(1123); + simple_macro!(1124); + simple_macro!(1125); + simple_macro!(1126); + simple_macro!(1127); + simple_macro!(1128); + simple_macro!(1129); + simple_macro!(1130); + simple_macro!(1131); + simple_macro!(1132); + simple_macro!(1133); + simple_macro!(1134); + simple_macro!(1135); + simple_macro!(1136); + simple_macro!(1137); + simple_macro!(1138); + simple_macro!(1139); + simple_macro!(1140); + simple_macro!(1141); + simple_macro!(1142); + simple_macro!(1143); + simple_macro!(1144); + simple_macro!(1145); + simple_macro!(1146); + simple_macro!(1147); + simple_macro!(1148); + simple_macro!(1149); + simple_macro!(1150); + simple_macro!(1151); + simple_macro!(1152); + simple_macro!(1153); + simple_macro!(1154); + simple_macro!(1155); + simple_macro!(1156); + simple_macro!(1157); + simple_macro!(1158); + simple_macro!(1159); + simple_macro!(1160); + simple_macro!(1161); + simple_macro!(1162); + simple_macro!(1163); + simple_macro!(1164); + simple_macro!(1165); + simple_macro!(1166); + simple_macro!(1167); + simple_macro!(1168); + simple_macro!(1169); + simple_macro!(1170); + simple_macro!(1171); + simple_macro!(1172); + simple_macro!(1173); + simple_macro!(1174); + simple_macro!(1175); + simple_macro!(1176); + simple_macro!(1177); + simple_macro!(1178); + simple_macro!(1179); + simple_macro!(1180); + simple_macro!(1181); + simple_macro!(1182); + simple_macro!(1183); + simple_macro!(1184); + simple_macro!(1185); + simple_macro!(1186); + simple_macro!(1187); + simple_macro!(1188); + simple_macro!(1189); + simple_macro!(1190); + simple_macro!(1191); + simple_macro!(1192); + simple_macro!(1193); + simple_macro!(1194); + simple_macro!(1195); + simple_macro!(1196); + simple_macro!(1197); + simple_macro!(1198); + simple_macro!(1199); + simple_macro!(1200); + simple_macro!(1201); + simple_macro!(1202); + simple_macro!(1203); + simple_macro!(1204); + simple_macro!(1205); + simple_macro!(1206); + simple_macro!(1207); + simple_macro!(1208); + simple_macro!(1209); + simple_macro!(1210); + simple_macro!(1211); + simple_macro!(1212); + simple_macro!(1213); + simple_macro!(1214); + simple_macro!(1215); + simple_macro!(1216); + simple_macro!(1217); + simple_macro!(1218); + simple_macro!(1219); + simple_macro!(1220); + simple_macro!(1221); + simple_macro!(1222); + simple_macro!(1223); + simple_macro!(1224); + simple_macro!(1225); + simple_macro!(1226); + simple_macro!(1227); + simple_macro!(1228); + simple_macro!(1229); + simple_macro!(1230); + simple_macro!(1231); + simple_macro!(1232); + simple_macro!(1233); + simple_macro!(1234); + simple_macro!(1235); + simple_macro!(1236); + simple_macro!(1237); + simple_macro!(1238); + simple_macro!(1239); + simple_macro!(1240); + simple_macro!(1241); + simple_macro!(1242); + simple_macro!(1243); + simple_macro!(1244); + simple_macro!(1245); + simple_macro!(1246); + simple_macro!(1247); + simple_macro!(1248); + simple_macro!(1249); + simple_macro!(1250); + simple_macro!(1251); + simple_macro!(1252); + simple_macro!(1253); + simple_macro!(1254); + simple_macro!(1255); + simple_macro!(1256); + simple_macro!(1257); + simple_macro!(1258); + simple_macro!(1259); + simple_macro!(1260); + simple_macro!(1261); + simple_macro!(1262); + simple_macro!(1263); + simple_macro!(1264); + simple_macro!(1265); + simple_macro!(1266); + simple_macro!(1267); + simple_macro!(1268); + simple_macro!(1269); + simple_macro!(1270); + simple_macro!(1271); + simple_macro!(1272); + simple_macro!(1273); + simple_macro!(1274); + simple_macro!(1275); + simple_macro!(1276); + simple_macro!(1277); + simple_macro!(1278); + simple_macro!(1279); + simple_macro!(1280); + simple_macro!(1281); + simple_macro!(1282); + simple_macro!(1283); + simple_macro!(1284); + simple_macro!(1285); + simple_macro!(1286); + simple_macro!(1287); + simple_macro!(1288); + simple_macro!(1289); + simple_macro!(1290); + simple_macro!(1291); + simple_macro!(1292); + simple_macro!(1293); + simple_macro!(1294); + simple_macro!(1295); + simple_macro!(1296); + simple_macro!(1297); + simple_macro!(1298); + simple_macro!(1299); + simple_macro!(1300); + simple_macro!(1301); + simple_macro!(1302); + simple_macro!(1303); + simple_macro!(1304); + simple_macro!(1305); + simple_macro!(1306); + simple_macro!(1307); + simple_macro!(1308); + simple_macro!(1309); + simple_macro!(1310); + simple_macro!(1311); + simple_macro!(1312); + simple_macro!(1313); + simple_macro!(1314); + simple_macro!(1315); + simple_macro!(1316); + simple_macro!(1317); + simple_macro!(1318); + simple_macro!(1319); + simple_macro!(1320); + simple_macro!(1321); + simple_macro!(1322); + simple_macro!(1323); + simple_macro!(1324); + simple_macro!(1325); + simple_macro!(1326); + simple_macro!(1327); + simple_macro!(1328); + simple_macro!(1329); + simple_macro!(1330); + simple_macro!(1331); + simple_macro!(1332); + simple_macro!(1333); + simple_macro!(1334); + simple_macro!(1335); + simple_macro!(1336); + simple_macro!(1337); + simple_macro!(1338); + simple_macro!(1339); + simple_macro!(1340); + simple_macro!(1341); + simple_macro!(1342); + simple_macro!(1343); + simple_macro!(1344); + simple_macro!(1345); + simple_macro!(1346); + simple_macro!(1347); + simple_macro!(1348); + simple_macro!(1349); + simple_macro!(1350); + simple_macro!(1351); + simple_macro!(1352); + simple_macro!(1353); + simple_macro!(1354); + simple_macro!(1355); + simple_macro!(1356); + simple_macro!(1357); + simple_macro!(1358); + simple_macro!(1359); + simple_macro!(1360); + simple_macro!(1361); + simple_macro!(1362); + simple_macro!(1363); + simple_macro!(1364); + simple_macro!(1365); + simple_macro!(1366); + simple_macro!(1367); + simple_macro!(1368); + simple_macro!(1369); + simple_macro!(1370); + simple_macro!(1371); + simple_macro!(1372); + simple_macro!(1373); + simple_macro!(1374); + simple_macro!(1375); + simple_macro!(1376); + simple_macro!(1377); + simple_macro!(1378); + simple_macro!(1379); + simple_macro!(1380); + simple_macro!(1381); + simple_macro!(1382); + simple_macro!(1383); + simple_macro!(1384); + simple_macro!(1385); + simple_macro!(1386); + simple_macro!(1387); + simple_macro!(1388); + simple_macro!(1389); + simple_macro!(1390); + simple_macro!(1391); + simple_macro!(1392); + simple_macro!(1393); + simple_macro!(1394); + simple_macro!(1395); + simple_macro!(1396); + simple_macro!(1397); + simple_macro!(1398); + simple_macro!(1399); + simple_macro!(1400); + simple_macro!(1401); + simple_macro!(1402); + simple_macro!(1403); + simple_macro!(1404); + simple_macro!(1405); + simple_macro!(1406); + simple_macro!(1407); + simple_macro!(1408); + simple_macro!(1409); + simple_macro!(1410); + simple_macro!(1411); + simple_macro!(1412); + simple_macro!(1413); + simple_macro!(1414); + simple_macro!(1415); + simple_macro!(1416); + simple_macro!(1417); + simple_macro!(1418); + simple_macro!(1419); + simple_macro!(1420); + simple_macro!(1421); + simple_macro!(1422); + simple_macro!(1423); + simple_macro!(1424); + simple_macro!(1425); + simple_macro!(1426); + simple_macro!(1427); + simple_macro!(1428); + simple_macro!(1429); + simple_macro!(1430); + simple_macro!(1431); + simple_macro!(1432); + simple_macro!(1433); + simple_macro!(1434); + simple_macro!(1435); + simple_macro!(1436); + simple_macro!(1437); + simple_macro!(1438); + simple_macro!(1439); + simple_macro!(1440); + simple_macro!(1441); + simple_macro!(1442); + simple_macro!(1443); + simple_macro!(1444); + simple_macro!(1445); + simple_macro!(1446); + simple_macro!(1447); + simple_macro!(1448); + simple_macro!(1449); + simple_macro!(1450); + simple_macro!(1451); + simple_macro!(1452); + simple_macro!(1453); + simple_macro!(1454); + simple_macro!(1455); + simple_macro!(1456); + simple_macro!(1457); + simple_macro!(1458); + simple_macro!(1459); + simple_macro!(1460); + simple_macro!(1461); + simple_macro!(1462); + simple_macro!(1463); + simple_macro!(1464); + simple_macro!(1465); + simple_macro!(1466); + simple_macro!(1467); + simple_macro!(1468); + simple_macro!(1469); + simple_macro!(1470); + simple_macro!(1471); + simple_macro!(1472); + simple_macro!(1473); + simple_macro!(1474); + simple_macro!(1475); + simple_macro!(1476); + simple_macro!(1477); + simple_macro!(1478); + simple_macro!(1479); + simple_macro!(1480); + simple_macro!(1481); + simple_macro!(1482); + simple_macro!(1483); + simple_macro!(1484); + simple_macro!(1485); + simple_macro!(1486); + simple_macro!(1487); + simple_macro!(1488); + simple_macro!(1489); + simple_macro!(1490); + simple_macro!(1491); + simple_macro!(1492); + simple_macro!(1493); + simple_macro!(1494); + simple_macro!(1495); + simple_macro!(1496); + simple_macro!(1497); + simple_macro!(1498); + simple_macro!(1499); + simple_macro!(1500); + simple_macro!(1501); + simple_macro!(1502); + simple_macro!(1503); + simple_macro!(1504); + simple_macro!(1505); + simple_macro!(1506); + simple_macro!(1507); + simple_macro!(1508); + simple_macro!(1509); + simple_macro!(1510); + simple_macro!(1511); + simple_macro!(1512); + simple_macro!(1513); + simple_macro!(1514); + simple_macro!(1515); + simple_macro!(1516); + simple_macro!(1517); + simple_macro!(1518); + simple_macro!(1519); + simple_macro!(1520); + simple_macro!(1521); + simple_macro!(1522); + simple_macro!(1523); + simple_macro!(1524); + simple_macro!(1525); + simple_macro!(1526); + simple_macro!(1527); + simple_macro!(1528); + simple_macro!(1529); + simple_macro!(1530); + simple_macro!(1531); + simple_macro!(1532); + simple_macro!(1533); + simple_macro!(1534); + simple_macro!(1535); + simple_macro!(1536); + simple_macro!(1537); + simple_macro!(1538); + simple_macro!(1539); + simple_macro!(1540); + simple_macro!(1541); + simple_macro!(1542); + simple_macro!(1543); + simple_macro!(1544); + simple_macro!(1545); + simple_macro!(1546); + simple_macro!(1547); + simple_macro!(1548); + simple_macro!(1549); + simple_macro!(1550); + simple_macro!(1551); + simple_macro!(1552); + simple_macro!(1553); + simple_macro!(1554); + simple_macro!(1555); + simple_macro!(1556); + simple_macro!(1557); + simple_macro!(1558); + simple_macro!(1559); + simple_macro!(1560); + simple_macro!(1561); + simple_macro!(1562); + simple_macro!(1563); + simple_macro!(1564); + simple_macro!(1565); + simple_macro!(1566); + simple_macro!(1567); + simple_macro!(1568); + simple_macro!(1569); + simple_macro!(1570); + simple_macro!(1571); + simple_macro!(1572); + simple_macro!(1573); + simple_macro!(1574); + simple_macro!(1575); + simple_macro!(1576); + simple_macro!(1577); + simple_macro!(1578); + simple_macro!(1579); + simple_macro!(1580); + simple_macro!(1581); + simple_macro!(1582); + simple_macro!(1583); + simple_macro!(1584); + simple_macro!(1585); + simple_macro!(1586); + simple_macro!(1587); + simple_macro!(1588); + simple_macro!(1589); + simple_macro!(1590); + simple_macro!(1591); + simple_macro!(1592); + simple_macro!(1593); + simple_macro!(1594); + simple_macro!(1595); + simple_macro!(1596); + simple_macro!(1597); + simple_macro!(1598); + simple_macro!(1599); + simple_macro!(1600); + simple_macro!(1601); + simple_macro!(1602); + simple_macro!(1603); + simple_macro!(1604); + simple_macro!(1605); + simple_macro!(1606); + simple_macro!(1607); + simple_macro!(1608); + simple_macro!(1609); + simple_macro!(1610); + simple_macro!(1611); + simple_macro!(1612); + simple_macro!(1613); + simple_macro!(1614); + simple_macro!(1615); + simple_macro!(1616); + simple_macro!(1617); + simple_macro!(1618); + simple_macro!(1619); + simple_macro!(1620); + simple_macro!(1621); + simple_macro!(1622); + simple_macro!(1623); + simple_macro!(1624); + simple_macro!(1625); + simple_macro!(1626); + simple_macro!(1627); + simple_macro!(1628); + simple_macro!(1629); + simple_macro!(1630); + simple_macro!(1631); + simple_macro!(1632); + simple_macro!(1633); + simple_macro!(1634); + simple_macro!(1635); + simple_macro!(1636); + simple_macro!(1637); + simple_macro!(1638); + simple_macro!(1639); + simple_macro!(1640); + simple_macro!(1641); + simple_macro!(1642); + simple_macro!(1643); + simple_macro!(1644); + simple_macro!(1645); + simple_macro!(1646); + simple_macro!(1647); + simple_macro!(1648); + simple_macro!(1649); + simple_macro!(1650); + simple_macro!(1651); + simple_macro!(1652); + simple_macro!(1653); + simple_macro!(1654); + simple_macro!(1655); + simple_macro!(1656); + simple_macro!(1657); + simple_macro!(1658); + simple_macro!(1659); + simple_macro!(1660); + simple_macro!(1661); + simple_macro!(1662); + simple_macro!(1663); + simple_macro!(1664); + simple_macro!(1665); + simple_macro!(1666); + simple_macro!(1667); + simple_macro!(1668); + simple_macro!(1669); + simple_macro!(1670); + simple_macro!(1671); + simple_macro!(1672); + simple_macro!(1673); + simple_macro!(1674); + simple_macro!(1675); + simple_macro!(1676); + simple_macro!(1677); + simple_macro!(1678); + simple_macro!(1679); + simple_macro!(1680); + simple_macro!(1681); + simple_macro!(1682); + simple_macro!(1683); + simple_macro!(1684); + simple_macro!(1685); + simple_macro!(1686); + simple_macro!(1687); + simple_macro!(1688); + simple_macro!(1689); + simple_macro!(1690); + simple_macro!(1691); + simple_macro!(1692); + simple_macro!(1693); + simple_macro!(1694); + simple_macro!(1695); + simple_macro!(1696); + simple_macro!(1697); + simple_macro!(1698); + simple_macro!(1699); + simple_macro!(1700); + simple_macro!(1701); + simple_macro!(1702); + simple_macro!(1703); + simple_macro!(1704); + simple_macro!(1705); + simple_macro!(1706); + simple_macro!(1707); + simple_macro!(1708); + simple_macro!(1709); + simple_macro!(1710); + simple_macro!(1711); + simple_macro!(1712); + simple_macro!(1713); + simple_macro!(1714); + simple_macro!(1715); + simple_macro!(1716); + simple_macro!(1717); + simple_macro!(1718); + simple_macro!(1719); + simple_macro!(1720); + simple_macro!(1721); + simple_macro!(1722); + simple_macro!(1723); + simple_macro!(1724); + simple_macro!(1725); + simple_macro!(1726); + simple_macro!(1727); + simple_macro!(1728); + simple_macro!(1729); + simple_macro!(1730); + simple_macro!(1731); + simple_macro!(1732); + simple_macro!(1733); + simple_macro!(1734); + simple_macro!(1735); + simple_macro!(1736); + simple_macro!(1737); + simple_macro!(1738); + simple_macro!(1739); + simple_macro!(1740); + simple_macro!(1741); + simple_macro!(1742); + simple_macro!(1743); + simple_macro!(1744); + simple_macro!(1745); + simple_macro!(1746); + simple_macro!(1747); + simple_macro!(1748); + simple_macro!(1749); + simple_macro!(1750); + simple_macro!(1751); + simple_macro!(1752); + simple_macro!(1753); + simple_macro!(1754); + simple_macro!(1755); + simple_macro!(1756); + simple_macro!(1757); + simple_macro!(1758); + simple_macro!(1759); + simple_macro!(1760); + simple_macro!(1761); + simple_macro!(1762); + simple_macro!(1763); + simple_macro!(1764); + simple_macro!(1765); + simple_macro!(1766); + simple_macro!(1767); + simple_macro!(1768); + simple_macro!(1769); + simple_macro!(1770); + simple_macro!(1771); + simple_macro!(1772); + simple_macro!(1773); + simple_macro!(1774); + simple_macro!(1775); + simple_macro!(1776); + simple_macro!(1777); + simple_macro!(1778); + simple_macro!(1779); + simple_macro!(1780); + simple_macro!(1781); + simple_macro!(1782); + simple_macro!(1783); + simple_macro!(1784); + simple_macro!(1785); + simple_macro!(1786); + simple_macro!(1787); + simple_macro!(1788); + simple_macro!(1789); + simple_macro!(1790); + simple_macro!(1791); + simple_macro!(1792); + simple_macro!(1793); + simple_macro!(1794); + simple_macro!(1795); + simple_macro!(1796); + simple_macro!(1797); + simple_macro!(1798); + simple_macro!(1799); + simple_macro!(1800); + simple_macro!(1801); + simple_macro!(1802); + simple_macro!(1803); + simple_macro!(1804); + simple_macro!(1805); + simple_macro!(1806); + simple_macro!(1807); + simple_macro!(1808); + simple_macro!(1809); + simple_macro!(1810); + simple_macro!(1811); + simple_macro!(1812); + simple_macro!(1813); + simple_macro!(1814); + simple_macro!(1815); + simple_macro!(1816); + simple_macro!(1817); + simple_macro!(1818); + simple_macro!(1819); + simple_macro!(1820); + simple_macro!(1821); + simple_macro!(1822); + simple_macro!(1823); + simple_macro!(1824); + simple_macro!(1825); + simple_macro!(1826); + simple_macro!(1827); + simple_macro!(1828); + simple_macro!(1829); + simple_macro!(1830); + simple_macro!(1831); + simple_macro!(1832); + simple_macro!(1833); + simple_macro!(1834); + simple_macro!(1835); + simple_macro!(1836); + simple_macro!(1837); + simple_macro!(1838); + simple_macro!(1839); + simple_macro!(1840); + simple_macro!(1841); + simple_macro!(1842); + simple_macro!(1843); + simple_macro!(1844); + simple_macro!(1845); + simple_macro!(1846); + simple_macro!(1847); + simple_macro!(1848); + simple_macro!(1849); + simple_macro!(1850); + simple_macro!(1851); + simple_macro!(1852); + simple_macro!(1853); + simple_macro!(1854); + simple_macro!(1855); + simple_macro!(1856); + simple_macro!(1857); + simple_macro!(1858); + simple_macro!(1859); + simple_macro!(1860); + simple_macro!(1861); + simple_macro!(1862); + simple_macro!(1863); + simple_macro!(1864); + simple_macro!(1865); + simple_macro!(1866); + simple_macro!(1867); + simple_macro!(1868); + simple_macro!(1869); + simple_macro!(1870); + simple_macro!(1871); + simple_macro!(1872); + simple_macro!(1873); + simple_macro!(1874); + simple_macro!(1875); + simple_macro!(1876); + simple_macro!(1877); + simple_macro!(1878); + simple_macro!(1879); + simple_macro!(1880); + simple_macro!(1881); + simple_macro!(1882); + simple_macro!(1883); + simple_macro!(1884); + simple_macro!(1885); + simple_macro!(1886); + simple_macro!(1887); + simple_macro!(1888); + simple_macro!(1889); + simple_macro!(1890); + simple_macro!(1891); + simple_macro!(1892); + simple_macro!(1893); + simple_macro!(1894); + simple_macro!(1895); + simple_macro!(1896); + simple_macro!(1897); + simple_macro!(1898); + simple_macro!(1899); + simple_macro!(1900); + simple_macro!(1901); + simple_macro!(1902); + simple_macro!(1903); + simple_macro!(1904); + simple_macro!(1905); + simple_macro!(1906); + simple_macro!(1907); + simple_macro!(1908); + simple_macro!(1909); + simple_macro!(1910); + simple_macro!(1911); + simple_macro!(1912); + simple_macro!(1913); + simple_macro!(1914); + simple_macro!(1915); + simple_macro!(1916); + simple_macro!(1917); + simple_macro!(1918); + simple_macro!(1919); + simple_macro!(1920); + simple_macro!(1921); + simple_macro!(1922); + simple_macro!(1923); + simple_macro!(1924); + simple_macro!(1925); + simple_macro!(1926); + simple_macro!(1927); + simple_macro!(1928); + simple_macro!(1929); + simple_macro!(1930); + simple_macro!(1931); + simple_macro!(1932); + simple_macro!(1933); + simple_macro!(1934); + simple_macro!(1935); + simple_macro!(1936); + simple_macro!(1937); + simple_macro!(1938); + simple_macro!(1939); + simple_macro!(1940); + simple_macro!(1941); + simple_macro!(1942); + simple_macro!(1943); + simple_macro!(1944); + simple_macro!(1945); + simple_macro!(1946); + simple_macro!(1947); + simple_macro!(1948); + simple_macro!(1949); + simple_macro!(1950); + simple_macro!(1951); + simple_macro!(1952); + simple_macro!(1953); + simple_macro!(1954); + simple_macro!(1955); + simple_macro!(1956); + simple_macro!(1957); + simple_macro!(1958); + simple_macro!(1959); + simple_macro!(1960); + simple_macro!(1961); + simple_macro!(1962); + simple_macro!(1963); + simple_macro!(1964); + simple_macro!(1965); + simple_macro!(1966); + simple_macro!(1967); + simple_macro!(1968); + simple_macro!(1969); + simple_macro!(1970); + simple_macro!(1971); + simple_macro!(1972); + simple_macro!(1973); + simple_macro!(1974); + simple_macro!(1975); + simple_macro!(1976); + simple_macro!(1977); + simple_macro!(1978); + simple_macro!(1979); + simple_macro!(1980); + simple_macro!(1981); + simple_macro!(1982); + simple_macro!(1983); + simple_macro!(1984); + simple_macro!(1985); + simple_macro!(1986); + simple_macro!(1987); + simple_macro!(1988); + simple_macro!(1989); + simple_macro!(1990); + simple_macro!(1991); + simple_macro!(1992); + simple_macro!(1993); + simple_macro!(1994); + simple_macro!(1995); + simple_macro!(1996); + simple_macro!(1997); + simple_macro!(1998); + simple_macro!(1999); + simple_macro!(2000); + simple_macro!(2001); + simple_macro!(2002); + simple_macro!(2003); + simple_macro!(2004); + simple_macro!(2005); + simple_macro!(2006); + simple_macro!(2007); + simple_macro!(2008); + simple_macro!(2009); + simple_macro!(2010); + simple_macro!(2011); + simple_macro!(2012); + simple_macro!(2013); + simple_macro!(2014); + simple_macro!(2015); + simple_macro!(2016); + simple_macro!(2017); + simple_macro!(2018); + simple_macro!(2019); + simple_macro!(2020); + simple_macro!(2021); + simple_macro!(2022); + simple_macro!(2023); + simple_macro!(2024); + simple_macro!(2025); + simple_macro!(2026); + simple_macro!(2027); + simple_macro!(2028); + simple_macro!(2029); + simple_macro!(2030); + simple_macro!(2031); + simple_macro!(2032); + simple_macro!(2033); + simple_macro!(2034); + simple_macro!(2035); + simple_macro!(2036); + simple_macro!(2037); + simple_macro!(2038); + simple_macro!(2039); + simple_macro!(2040); + simple_macro!(2041); + simple_macro!(2042); + simple_macro!(2043); + simple_macro!(2044); + simple_macro!(2045); + simple_macro!(2046); + simple_macro!(2047); + simple_macro!(2048); + simple_macro!(2049); + simple_macro!(2050); + simple_macro!(2051); + simple_macro!(2052); + simple_macro!(2053); + simple_macro!(2054); + simple_macro!(2055); + simple_macro!(2056); + simple_macro!(2057); + simple_macro!(2058); + simple_macro!(2059); + simple_macro!(2060); + simple_macro!(2061); + simple_macro!(2062); + simple_macro!(2063); + simple_macro!(2064); + simple_macro!(2065); + simple_macro!(2066); + simple_macro!(2067); + simple_macro!(2068); + simple_macro!(2069); + simple_macro!(2070); + simple_macro!(2071); + simple_macro!(2072); + simple_macro!(2073); + simple_macro!(2074); + simple_macro!(2075); + simple_macro!(2076); + simple_macro!(2077); + simple_macro!(2078); + simple_macro!(2079); + simple_macro!(2080); + simple_macro!(2081); + simple_macro!(2082); + simple_macro!(2083); + simple_macro!(2084); + simple_macro!(2085); + simple_macro!(2086); + simple_macro!(2087); + simple_macro!(2088); + simple_macro!(2089); + simple_macro!(2090); + simple_macro!(2091); + simple_macro!(2092); + simple_macro!(2093); + simple_macro!(2094); + simple_macro!(2095); + simple_macro!(2096); + simple_macro!(2097); + simple_macro!(2098); + simple_macro!(2099); + simple_macro!(2100); + simple_macro!(2101); + simple_macro!(2102); + simple_macro!(2103); + simple_macro!(2104); + simple_macro!(2105); + simple_macro!(2106); + simple_macro!(2107); + simple_macro!(2108); + simple_macro!(2109); + simple_macro!(2110); + simple_macro!(2111); + simple_macro!(2112); + simple_macro!(2113); + simple_macro!(2114); + simple_macro!(2115); + simple_macro!(2116); + simple_macro!(2117); + simple_macro!(2118); + simple_macro!(2119); + simple_macro!(2120); + simple_macro!(2121); + simple_macro!(2122); + simple_macro!(2123); + simple_macro!(2124); + simple_macro!(2125); + simple_macro!(2126); + simple_macro!(2127); + simple_macro!(2128); + simple_macro!(2129); + simple_macro!(2130); + simple_macro!(2131); + simple_macro!(2132); + simple_macro!(2133); + simple_macro!(2134); + simple_macro!(2135); + simple_macro!(2136); + simple_macro!(2137); + simple_macro!(2138); + simple_macro!(2139); + simple_macro!(2140); + simple_macro!(2141); + simple_macro!(2142); + simple_macro!(2143); + simple_macro!(2144); + simple_macro!(2145); + simple_macro!(2146); + simple_macro!(2147); + simple_macro!(2148); + simple_macro!(2149); + simple_macro!(2150); + simple_macro!(2151); + simple_macro!(2152); + simple_macro!(2153); + simple_macro!(2154); + simple_macro!(2155); + simple_macro!(2156); + simple_macro!(2157); + simple_macro!(2158); + simple_macro!(2159); + simple_macro!(2160); + simple_macro!(2161); + simple_macro!(2162); + simple_macro!(2163); + simple_macro!(2164); + simple_macro!(2165); + simple_macro!(2166); + simple_macro!(2167); + simple_macro!(2168); + simple_macro!(2169); + simple_macro!(2170); + simple_macro!(2171); + simple_macro!(2172); + simple_macro!(2173); + simple_macro!(2174); + simple_macro!(2175); + simple_macro!(2176); + simple_macro!(2177); + simple_macro!(2178); + simple_macro!(2179); + simple_macro!(2180); + simple_macro!(2181); + simple_macro!(2182); + simple_macro!(2183); + simple_macro!(2184); + simple_macro!(2185); + simple_macro!(2186); + simple_macro!(2187); + simple_macro!(2188); + simple_macro!(2189); + simple_macro!(2190); + simple_macro!(2191); + simple_macro!(2192); + simple_macro!(2193); + simple_macro!(2194); + simple_macro!(2195); + simple_macro!(2196); + simple_macro!(2197); + simple_macro!(2198); + simple_macro!(2199); + simple_macro!(2200); + simple_macro!(2201); + simple_macro!(2202); + simple_macro!(2203); + simple_macro!(2204); + simple_macro!(2205); + simple_macro!(2206); + simple_macro!(2207); + simple_macro!(2208); + simple_macro!(2209); + simple_macro!(2210); + simple_macro!(2211); + simple_macro!(2212); + simple_macro!(2213); + simple_macro!(2214); + simple_macro!(2215); + simple_macro!(2216); + simple_macro!(2217); + simple_macro!(2218); + simple_macro!(2219); + simple_macro!(2220); + simple_macro!(2221); + simple_macro!(2222); + simple_macro!(2223); + simple_macro!(2224); + simple_macro!(2225); + simple_macro!(2226); + simple_macro!(2227); + simple_macro!(2228); + simple_macro!(2229); + simple_macro!(2230); + simple_macro!(2231); + simple_macro!(2232); + simple_macro!(2233); + simple_macro!(2234); + simple_macro!(2235); + simple_macro!(2236); + simple_macro!(2237); + simple_macro!(2238); + simple_macro!(2239); + simple_macro!(2240); + simple_macro!(2241); + simple_macro!(2242); + simple_macro!(2243); + simple_macro!(2244); + simple_macro!(2245); + simple_macro!(2246); + simple_macro!(2247); + simple_macro!(2248); + simple_macro!(2249); + simple_macro!(2250); + simple_macro!(2251); + simple_macro!(2252); + simple_macro!(2253); + simple_macro!(2254); + simple_macro!(2255); + simple_macro!(2256); + simple_macro!(2257); + simple_macro!(2258); + simple_macro!(2259); + simple_macro!(2260); + simple_macro!(2261); + simple_macro!(2262); + simple_macro!(2263); + simple_macro!(2264); + simple_macro!(2265); + simple_macro!(2266); + simple_macro!(2267); + simple_macro!(2268); + simple_macro!(2269); + simple_macro!(2270); + simple_macro!(2271); + simple_macro!(2272); + simple_macro!(2273); + simple_macro!(2274); + simple_macro!(2275); + simple_macro!(2276); + simple_macro!(2277); + simple_macro!(2278); + simple_macro!(2279); + simple_macro!(2280); + simple_macro!(2281); + simple_macro!(2282); + simple_macro!(2283); + simple_macro!(2284); + simple_macro!(2285); + simple_macro!(2286); + simple_macro!(2287); + simple_macro!(2288); + simple_macro!(2289); + simple_macro!(2290); + simple_macro!(2291); + simple_macro!(2292); + simple_macro!(2293); + simple_macro!(2294); + simple_macro!(2295); + simple_macro!(2296); + simple_macro!(2297); + simple_macro!(2298); + simple_macro!(2299); + simple_macro!(2300); + simple_macro!(2301); + simple_macro!(2302); + simple_macro!(2303); + simple_macro!(2304); + simple_macro!(2305); + simple_macro!(2306); + simple_macro!(2307); + simple_macro!(2308); + simple_macro!(2309); + simple_macro!(2310); + simple_macro!(2311); + simple_macro!(2312); + simple_macro!(2313); + simple_macro!(2314); + simple_macro!(2315); + simple_macro!(2316); + simple_macro!(2317); + simple_macro!(2318); + simple_macro!(2319); + simple_macro!(2320); + simple_macro!(2321); + simple_macro!(2322); + simple_macro!(2323); + simple_macro!(2324); + simple_macro!(2325); + simple_macro!(2326); + simple_macro!(2327); + simple_macro!(2328); + simple_macro!(2329); + simple_macro!(2330); + simple_macro!(2331); + simple_macro!(2332); + simple_macro!(2333); + simple_macro!(2334); + simple_macro!(2335); + simple_macro!(2336); + simple_macro!(2337); + simple_macro!(2338); + simple_macro!(2339); + simple_macro!(2340); + simple_macro!(2341); + simple_macro!(2342); + simple_macro!(2343); + simple_macro!(2344); + simple_macro!(2345); + simple_macro!(2346); + simple_macro!(2347); + simple_macro!(2348); + simple_macro!(2349); + simple_macro!(2350); + simple_macro!(2351); + simple_macro!(2352); + simple_macro!(2353); + simple_macro!(2354); + simple_macro!(2355); + simple_macro!(2356); + simple_macro!(2357); + simple_macro!(2358); + simple_macro!(2359); + simple_macro!(2360); + simple_macro!(2361); + simple_macro!(2362); + simple_macro!(2363); + simple_macro!(2364); + simple_macro!(2365); + simple_macro!(2366); + simple_macro!(2367); + simple_macro!(2368); + simple_macro!(2369); + simple_macro!(2370); + simple_macro!(2371); + simple_macro!(2372); + simple_macro!(2373); + simple_macro!(2374); + simple_macro!(2375); + simple_macro!(2376); + simple_macro!(2377); + simple_macro!(2378); + simple_macro!(2379); + simple_macro!(2380); + simple_macro!(2381); + simple_macro!(2382); + simple_macro!(2383); + simple_macro!(2384); + simple_macro!(2385); + simple_macro!(2386); + simple_macro!(2387); + simple_macro!(2388); + simple_macro!(2389); + simple_macro!(2390); + simple_macro!(2391); + simple_macro!(2392); + simple_macro!(2393); + simple_macro!(2394); + simple_macro!(2395); + simple_macro!(2396); + simple_macro!(2397); + simple_macro!(2398); + simple_macro!(2399); + simple_macro!(2400); + simple_macro!(2401); + simple_macro!(2402); + simple_macro!(2403); + simple_macro!(2404); + simple_macro!(2405); + simple_macro!(2406); + simple_macro!(2407); + simple_macro!(2408); + simple_macro!(2409); + simple_macro!(2410); + simple_macro!(2411); + simple_macro!(2412); + simple_macro!(2413); + simple_macro!(2414); + simple_macro!(2415); + simple_macro!(2416); + simple_macro!(2417); + simple_macro!(2418); + simple_macro!(2419); + simple_macro!(2420); + simple_macro!(2421); + simple_macro!(2422); + simple_macro!(2423); + simple_macro!(2424); + simple_macro!(2425); + simple_macro!(2426); + simple_macro!(2427); + simple_macro!(2428); + simple_macro!(2429); + simple_macro!(2430); + simple_macro!(2431); + simple_macro!(2432); + simple_macro!(2433); + simple_macro!(2434); + simple_macro!(2435); + simple_macro!(2436); + simple_macro!(2437); + simple_macro!(2438); + simple_macro!(2439); + simple_macro!(2440); + simple_macro!(2441); + simple_macro!(2442); + simple_macro!(2443); + simple_macro!(2444); + simple_macro!(2445); + simple_macro!(2446); + simple_macro!(2447); + simple_macro!(2448); + simple_macro!(2449); + simple_macro!(2450); + simple_macro!(2451); + simple_macro!(2452); + simple_macro!(2453); + simple_macro!(2454); + simple_macro!(2455); + simple_macro!(2456); + simple_macro!(2457); + simple_macro!(2458); + simple_macro!(2459); + simple_macro!(2460); + simple_macro!(2461); + simple_macro!(2462); + simple_macro!(2463); + simple_macro!(2464); + simple_macro!(2465); + simple_macro!(2466); + simple_macro!(2467); + simple_macro!(2468); + simple_macro!(2469); + simple_macro!(2470); + simple_macro!(2471); + simple_macro!(2472); + simple_macro!(2473); + simple_macro!(2474); + simple_macro!(2475); + simple_macro!(2476); + simple_macro!(2477); + simple_macro!(2478); + simple_macro!(2479); + simple_macro!(2480); + simple_macro!(2481); + simple_macro!(2482); + simple_macro!(2483); + simple_macro!(2484); + simple_macro!(2485); + simple_macro!(2486); + simple_macro!(2487); + simple_macro!(2488); + simple_macro!(2489); + simple_macro!(2490); + simple_macro!(2491); + simple_macro!(2492); + simple_macro!(2493); + simple_macro!(2494); + simple_macro!(2495); + simple_macro!(2496); + simple_macro!(2497); + simple_macro!(2498); + simple_macro!(2499); + simple_macro!(2500); + simple_macro!(2501); + simple_macro!(2502); + simple_macro!(2503); + simple_macro!(2504); + simple_macro!(2505); + simple_macro!(2506); + simple_macro!(2507); + simple_macro!(2508); + simple_macro!(2509); + simple_macro!(2510); + simple_macro!(2511); + simple_macro!(2512); + simple_macro!(2513); + simple_macro!(2514); + simple_macro!(2515); + simple_macro!(2516); + simple_macro!(2517); + simple_macro!(2518); + simple_macro!(2519); + simple_macro!(2520); + simple_macro!(2521); + simple_macro!(2522); + simple_macro!(2523); + simple_macro!(2524); + simple_macro!(2525); + simple_macro!(2526); + simple_macro!(2527); + simple_macro!(2528); + simple_macro!(2529); + simple_macro!(2530); + simple_macro!(2531); + simple_macro!(2532); + simple_macro!(2533); + simple_macro!(2534); + simple_macro!(2535); + simple_macro!(2536); + simple_macro!(2537); + simple_macro!(2538); + simple_macro!(2539); + simple_macro!(2540); + simple_macro!(2541); + simple_macro!(2542); + simple_macro!(2543); + simple_macro!(2544); + simple_macro!(2545); + simple_macro!(2546); + simple_macro!(2547); + simple_macro!(2548); + simple_macro!(2549); + simple_macro!(2550); + simple_macro!(2551); + simple_macro!(2552); + simple_macro!(2553); + simple_macro!(2554); + simple_macro!(2555); + simple_macro!(2556); + simple_macro!(2557); + simple_macro!(2558); + simple_macro!(2559); + simple_macro!(2560); + simple_macro!(2561); + simple_macro!(2562); + simple_macro!(2563); + simple_macro!(2564); + simple_macro!(2565); + simple_macro!(2566); + simple_macro!(2567); + simple_macro!(2568); + simple_macro!(2569); + simple_macro!(2570); + simple_macro!(2571); + simple_macro!(2572); + simple_macro!(2573); + simple_macro!(2574); + simple_macro!(2575); + simple_macro!(2576); + simple_macro!(2577); + simple_macro!(2578); + simple_macro!(2579); + simple_macro!(2580); + simple_macro!(2581); + simple_macro!(2582); + simple_macro!(2583); + simple_macro!(2584); + simple_macro!(2585); + simple_macro!(2586); + simple_macro!(2587); + simple_macro!(2588); + simple_macro!(2589); + simple_macro!(2590); + simple_macro!(2591); + simple_macro!(2592); + simple_macro!(2593); + simple_macro!(2594); + simple_macro!(2595); + simple_macro!(2596); + simple_macro!(2597); + simple_macro!(2598); + simple_macro!(2599); + simple_macro!(2600); + simple_macro!(2601); + simple_macro!(2602); + simple_macro!(2603); + simple_macro!(2604); + simple_macro!(2605); + simple_macro!(2606); + simple_macro!(2607); + simple_macro!(2608); + simple_macro!(2609); + simple_macro!(2610); + simple_macro!(2611); + simple_macro!(2612); + simple_macro!(2613); + simple_macro!(2614); + simple_macro!(2615); + simple_macro!(2616); + simple_macro!(2617); + simple_macro!(2618); + simple_macro!(2619); + simple_macro!(2620); + simple_macro!(2621); + simple_macro!(2622); + simple_macro!(2623); + simple_macro!(2624); + simple_macro!(2625); + simple_macro!(2626); + simple_macro!(2627); + simple_macro!(2628); + simple_macro!(2629); + simple_macro!(2630); + simple_macro!(2631); + simple_macro!(2632); + simple_macro!(2633); + simple_macro!(2634); + simple_macro!(2635); + simple_macro!(2636); + simple_macro!(2637); + simple_macro!(2638); + simple_macro!(2639); + simple_macro!(2640); + simple_macro!(2641); + simple_macro!(2642); + simple_macro!(2643); + simple_macro!(2644); + simple_macro!(2645); + simple_macro!(2646); + simple_macro!(2647); + simple_macro!(2648); + simple_macro!(2649); + simple_macro!(2650); + simple_macro!(2651); + simple_macro!(2652); + simple_macro!(2653); + simple_macro!(2654); + simple_macro!(2655); + simple_macro!(2656); + simple_macro!(2657); + simple_macro!(2658); + simple_macro!(2659); + simple_macro!(2660); + simple_macro!(2661); + simple_macro!(2662); + simple_macro!(2663); + simple_macro!(2664); + simple_macro!(2665); + simple_macro!(2666); + simple_macro!(2667); + simple_macro!(2668); + simple_macro!(2669); + simple_macro!(2670); + simple_macro!(2671); + simple_macro!(2672); + simple_macro!(2673); + simple_macro!(2674); + simple_macro!(2675); + simple_macro!(2676); + simple_macro!(2677); + simple_macro!(2678); + simple_macro!(2679); + simple_macro!(2680); + simple_macro!(2681); + simple_macro!(2682); + simple_macro!(2683); + simple_macro!(2684); + simple_macro!(2685); + simple_macro!(2686); + simple_macro!(2687); + simple_macro!(2688); + simple_macro!(2689); + simple_macro!(2690); + simple_macro!(2691); + simple_macro!(2692); + simple_macro!(2693); + simple_macro!(2694); + simple_macro!(2695); + simple_macro!(2696); + simple_macro!(2697); + simple_macro!(2698); + simple_macro!(2699); + simple_macro!(2700); + simple_macro!(2701); + simple_macro!(2702); + simple_macro!(2703); + simple_macro!(2704); + simple_macro!(2705); + simple_macro!(2706); + simple_macro!(2707); + simple_macro!(2708); + simple_macro!(2709); + simple_macro!(2710); + simple_macro!(2711); + simple_macro!(2712); + simple_macro!(2713); + simple_macro!(2714); + simple_macro!(2715); + simple_macro!(2716); + simple_macro!(2717); + simple_macro!(2718); + simple_macro!(2719); + simple_macro!(2720); + simple_macro!(2721); + simple_macro!(2722); + simple_macro!(2723); + simple_macro!(2724); + simple_macro!(2725); + simple_macro!(2726); + simple_macro!(2727); + simple_macro!(2728); + simple_macro!(2729); + simple_macro!(2730); + simple_macro!(2731); + simple_macro!(2732); + simple_macro!(2733); + simple_macro!(2734); + simple_macro!(2735); + simple_macro!(2736); + simple_macro!(2737); + simple_macro!(2738); + simple_macro!(2739); + simple_macro!(2740); + simple_macro!(2741); + simple_macro!(2742); + simple_macro!(2743); + simple_macro!(2744); + simple_macro!(2745); + simple_macro!(2746); + simple_macro!(2747); + simple_macro!(2748); + simple_macro!(2749); + simple_macro!(2750); + simple_macro!(2751); + simple_macro!(2752); + simple_macro!(2753); + simple_macro!(2754); + simple_macro!(2755); + simple_macro!(2756); + simple_macro!(2757); + simple_macro!(2758); + simple_macro!(2759); + simple_macro!(2760); + simple_macro!(2761); + simple_macro!(2762); + simple_macro!(2763); + simple_macro!(2764); + simple_macro!(2765); + simple_macro!(2766); + simple_macro!(2767); + simple_macro!(2768); + simple_macro!(2769); + simple_macro!(2770); + simple_macro!(2771); + simple_macro!(2772); + simple_macro!(2773); + simple_macro!(2774); + simple_macro!(2775); + simple_macro!(2776); + simple_macro!(2777); + simple_macro!(2778); + simple_macro!(2779); + simple_macro!(2780); + simple_macro!(2781); + simple_macro!(2782); + simple_macro!(2783); + simple_macro!(2784); + simple_macro!(2785); + simple_macro!(2786); + simple_macro!(2787); + simple_macro!(2788); + simple_macro!(2789); + simple_macro!(2790); + simple_macro!(2791); + simple_macro!(2792); + simple_macro!(2793); + simple_macro!(2794); + simple_macro!(2795); + simple_macro!(2796); + simple_macro!(2797); + simple_macro!(2798); + simple_macro!(2799); + simple_macro!(2800); + simple_macro!(2801); + simple_macro!(2802); + simple_macro!(2803); + simple_macro!(2804); + simple_macro!(2805); + simple_macro!(2806); + simple_macro!(2807); + simple_macro!(2808); + simple_macro!(2809); + simple_macro!(2810); + simple_macro!(2811); + simple_macro!(2812); + simple_macro!(2813); + simple_macro!(2814); + simple_macro!(2815); + simple_macro!(2816); + simple_macro!(2817); + simple_macro!(2818); + simple_macro!(2819); + simple_macro!(2820); + simple_macro!(2821); + simple_macro!(2822); + simple_macro!(2823); + simple_macro!(2824); + simple_macro!(2825); + simple_macro!(2826); + simple_macro!(2827); + simple_macro!(2828); + simple_macro!(2829); + simple_macro!(2830); + simple_macro!(2831); + simple_macro!(2832); + simple_macro!(2833); + simple_macro!(2834); + simple_macro!(2835); + simple_macro!(2836); + simple_macro!(2837); + simple_macro!(2838); + simple_macro!(2839); + simple_macro!(2840); + simple_macro!(2841); + simple_macro!(2842); + simple_macro!(2843); + simple_macro!(2844); + simple_macro!(2845); + simple_macro!(2846); + simple_macro!(2847); + simple_macro!(2848); + simple_macro!(2849); + simple_macro!(2850); + simple_macro!(2851); + simple_macro!(2852); + simple_macro!(2853); + simple_macro!(2854); + simple_macro!(2855); + simple_macro!(2856); + simple_macro!(2857); + simple_macro!(2858); + simple_macro!(2859); + simple_macro!(2860); + simple_macro!(2861); + simple_macro!(2862); + simple_macro!(2863); + simple_macro!(2864); + simple_macro!(2865); + simple_macro!(2866); + simple_macro!(2867); + simple_macro!(2868); + simple_macro!(2869); + simple_macro!(2870); + simple_macro!(2871); + simple_macro!(2872); + simple_macro!(2873); + simple_macro!(2874); + simple_macro!(2875); + simple_macro!(2876); + simple_macro!(2877); + simple_macro!(2878); + simple_macro!(2879); + simple_macro!(2880); + simple_macro!(2881); + simple_macro!(2882); + simple_macro!(2883); + simple_macro!(2884); + simple_macro!(2885); + simple_macro!(2886); + simple_macro!(2887); + simple_macro!(2888); + simple_macro!(2889); + simple_macro!(2890); + simple_macro!(2891); + simple_macro!(2892); + simple_macro!(2893); + simple_macro!(2894); + simple_macro!(2895); + simple_macro!(2896); + simple_macro!(2897); + simple_macro!(2898); + simple_macro!(2899); + simple_macro!(2900); + simple_macro!(2901); + simple_macro!(2902); + simple_macro!(2903); + simple_macro!(2904); + simple_macro!(2905); + simple_macro!(2906); + simple_macro!(2907); + simple_macro!(2908); + simple_macro!(2909); + simple_macro!(2910); + simple_macro!(2911); + simple_macro!(2912); + simple_macro!(2913); + simple_macro!(2914); + simple_macro!(2915); + simple_macro!(2916); + simple_macro!(2917); + simple_macro!(2918); + simple_macro!(2919); + simple_macro!(2920); + simple_macro!(2921); + simple_macro!(2922); + simple_macro!(2923); + simple_macro!(2924); + simple_macro!(2925); + simple_macro!(2926); + simple_macro!(2927); + simple_macro!(2928); + simple_macro!(2929); + simple_macro!(2930); + simple_macro!(2931); + simple_macro!(2932); + simple_macro!(2933); + simple_macro!(2934); + simple_macro!(2935); + simple_macro!(2936); + simple_macro!(2937); + simple_macro!(2938); + simple_macro!(2939); + simple_macro!(2940); + simple_macro!(2941); + simple_macro!(2942); + simple_macro!(2943); + simple_macro!(2944); + simple_macro!(2945); + simple_macro!(2946); + simple_macro!(2947); + simple_macro!(2948); + simple_macro!(2949); + simple_macro!(2950); + simple_macro!(2951); + simple_macro!(2952); + simple_macro!(2953); + simple_macro!(2954); + simple_macro!(2955); + simple_macro!(2956); + simple_macro!(2957); + simple_macro!(2958); + simple_macro!(2959); + simple_macro!(2960); + simple_macro!(2961); + simple_macro!(2962); + simple_macro!(2963); + simple_macro!(2964); + simple_macro!(2965); + simple_macro!(2966); + simple_macro!(2967); + simple_macro!(2968); + simple_macro!(2969); + simple_macro!(2970); + simple_macro!(2971); + simple_macro!(2972); + simple_macro!(2973); + simple_macro!(2974); + simple_macro!(2975); + simple_macro!(2976); + simple_macro!(2977); + simple_macro!(2978); + simple_macro!(2979); + simple_macro!(2980); + simple_macro!(2981); + simple_macro!(2982); + simple_macro!(2983); + simple_macro!(2984); + simple_macro!(2985); + simple_macro!(2986); + simple_macro!(2987); + simple_macro!(2988); + simple_macro!(2989); + simple_macro!(2990); + simple_macro!(2991); + simple_macro!(2992); + simple_macro!(2993); + simple_macro!(2994); + simple_macro!(2995); + simple_macro!(2996); + simple_macro!(2997); + simple_macro!(2998); + simple_macro!(2999); + simple_macro!(3000); + simple_macro!(3001); + simple_macro!(3002); + simple_macro!(3003); + simple_macro!(3004); + simple_macro!(3005); + simple_macro!(3006); + simple_macro!(3007); + simple_macro!(3008); + simple_macro!(3009); + simple_macro!(3010); + simple_macro!(3011); + simple_macro!(3012); + simple_macro!(3013); + simple_macro!(3014); + simple_macro!(3015); + simple_macro!(3016); + simple_macro!(3017); + simple_macro!(3018); + simple_macro!(3019); + simple_macro!(3020); + simple_macro!(3021); + simple_macro!(3022); + simple_macro!(3023); + simple_macro!(3024); + simple_macro!(3025); + simple_macro!(3026); + simple_macro!(3027); + simple_macro!(3028); + simple_macro!(3029); + simple_macro!(3030); + simple_macro!(3031); + simple_macro!(3032); + simple_macro!(3033); + simple_macro!(3034); + simple_macro!(3035); + simple_macro!(3036); + simple_macro!(3037); + simple_macro!(3038); + simple_macro!(3039); + simple_macro!(3040); + simple_macro!(3041); + simple_macro!(3042); + simple_macro!(3043); + simple_macro!(3044); + simple_macro!(3045); + simple_macro!(3046); + simple_macro!(3047); + simple_macro!(3048); + simple_macro!(3049); + simple_macro!(3050); + simple_macro!(3051); + simple_macro!(3052); + simple_macro!(3053); + simple_macro!(3054); + simple_macro!(3055); + simple_macro!(3056); + simple_macro!(3057); + simple_macro!(3058); + simple_macro!(3059); + simple_macro!(3060); + simple_macro!(3061); + simple_macro!(3062); + simple_macro!(3063); + simple_macro!(3064); + simple_macro!(3065); + simple_macro!(3066); + simple_macro!(3067); + simple_macro!(3068); + simple_macro!(3069); + simple_macro!(3070); + simple_macro!(3071); + simple_macro!(3072); + simple_macro!(3073); + simple_macro!(3074); + simple_macro!(3075); + simple_macro!(3076); + simple_macro!(3077); + simple_macro!(3078); + simple_macro!(3079); + simple_macro!(3080); + simple_macro!(3081); + simple_macro!(3082); + simple_macro!(3083); + simple_macro!(3084); + simple_macro!(3085); + simple_macro!(3086); + simple_macro!(3087); + simple_macro!(3088); + simple_macro!(3089); + simple_macro!(3090); + simple_macro!(3091); + simple_macro!(3092); + simple_macro!(3093); + simple_macro!(3094); + simple_macro!(3095); + simple_macro!(3096); + simple_macro!(3097); + simple_macro!(3098); + simple_macro!(3099); + simple_macro!(3100); + simple_macro!(3101); + simple_macro!(3102); + simple_macro!(3103); + simple_macro!(3104); + simple_macro!(3105); + simple_macro!(3106); + simple_macro!(3107); + simple_macro!(3108); + simple_macro!(3109); + simple_macro!(3110); + simple_macro!(3111); + simple_macro!(3112); + simple_macro!(3113); + simple_macro!(3114); + simple_macro!(3115); + simple_macro!(3116); + simple_macro!(3117); + simple_macro!(3118); + simple_macro!(3119); + simple_macro!(3120); + simple_macro!(3121); + simple_macro!(3122); + simple_macro!(3123); + simple_macro!(3124); + simple_macro!(3125); + simple_macro!(3126); + simple_macro!(3127); + simple_macro!(3128); + simple_macro!(3129); + simple_macro!(3130); + simple_macro!(3131); + simple_macro!(3132); + simple_macro!(3133); + simple_macro!(3134); + simple_macro!(3135); + simple_macro!(3136); + simple_macro!(3137); + simple_macro!(3138); + simple_macro!(3139); + simple_macro!(3140); + simple_macro!(3141); + simple_macro!(3142); + simple_macro!(3143); + simple_macro!(3144); + simple_macro!(3145); + simple_macro!(3146); + simple_macro!(3147); + simple_macro!(3148); + simple_macro!(3149); + simple_macro!(3150); + simple_macro!(3151); + simple_macro!(3152); + simple_macro!(3153); + simple_macro!(3154); + simple_macro!(3155); + simple_macro!(3156); + simple_macro!(3157); + simple_macro!(3158); + simple_macro!(3159); + simple_macro!(3160); + simple_macro!(3161); + simple_macro!(3162); + simple_macro!(3163); + simple_macro!(3164); + simple_macro!(3165); + simple_macro!(3166); + simple_macro!(3167); + simple_macro!(3168); + simple_macro!(3169); + simple_macro!(3170); + simple_macro!(3171); + simple_macro!(3172); + simple_macro!(3173); + simple_macro!(3174); + simple_macro!(3175); + simple_macro!(3176); + simple_macro!(3177); + simple_macro!(3178); + simple_macro!(3179); + simple_macro!(3180); + simple_macro!(3181); + simple_macro!(3182); + simple_macro!(3183); + simple_macro!(3184); + simple_macro!(3185); + simple_macro!(3186); + simple_macro!(3187); + simple_macro!(3188); + simple_macro!(3189); + simple_macro!(3190); + simple_macro!(3191); + simple_macro!(3192); + simple_macro!(3193); + simple_macro!(3194); + simple_macro!(3195); + simple_macro!(3196); + simple_macro!(3197); + simple_macro!(3198); + simple_macro!(3199); + simple_macro!(3200); + simple_macro!(3201); + simple_macro!(3202); + simple_macro!(3203); + simple_macro!(3204); + simple_macro!(3205); + simple_macro!(3206); + simple_macro!(3207); + simple_macro!(3208); + simple_macro!(3209); + simple_macro!(3210); + simple_macro!(3211); + simple_macro!(3212); + simple_macro!(3213); + simple_macro!(3214); + simple_macro!(3215); + simple_macro!(3216); + simple_macro!(3217); + simple_macro!(3218); + simple_macro!(3219); + simple_macro!(3220); + simple_macro!(3221); + simple_macro!(3222); + simple_macro!(3223); + simple_macro!(3224); + simple_macro!(3225); + simple_macro!(3226); + simple_macro!(3227); + simple_macro!(3228); + simple_macro!(3229); + simple_macro!(3230); + simple_macro!(3231); + simple_macro!(3232); + simple_macro!(3233); + simple_macro!(3234); + simple_macro!(3235); + simple_macro!(3236); + simple_macro!(3237); + simple_macro!(3238); + simple_macro!(3239); + simple_macro!(3240); + simple_macro!(3241); + simple_macro!(3242); + simple_macro!(3243); + simple_macro!(3244); + simple_macro!(3245); + simple_macro!(3246); + simple_macro!(3247); + simple_macro!(3248); + simple_macro!(3249); + simple_macro!(3250); + simple_macro!(3251); + simple_macro!(3252); + simple_macro!(3253); + simple_macro!(3254); + simple_macro!(3255); + simple_macro!(3256); + simple_macro!(3257); + simple_macro!(3258); + simple_macro!(3259); + simple_macro!(3260); + simple_macro!(3261); + simple_macro!(3262); + simple_macro!(3263); + simple_macro!(3264); + simple_macro!(3265); + simple_macro!(3266); + simple_macro!(3267); + simple_macro!(3268); + simple_macro!(3269); + simple_macro!(3270); + simple_macro!(3271); + simple_macro!(3272); + simple_macro!(3273); + simple_macro!(3274); + simple_macro!(3275); + simple_macro!(3276); + simple_macro!(3277); + simple_macro!(3278); + simple_macro!(3279); + simple_macro!(3280); + simple_macro!(3281); + simple_macro!(3282); + simple_macro!(3283); + simple_macro!(3284); + simple_macro!(3285); + simple_macro!(3286); + simple_macro!(3287); + simple_macro!(3288); + simple_macro!(3289); + simple_macro!(3290); + simple_macro!(3291); + simple_macro!(3292); + simple_macro!(3293); + simple_macro!(3294); + simple_macro!(3295); + simple_macro!(3296); + simple_macro!(3297); + simple_macro!(3298); + simple_macro!(3299); + simple_macro!(3300); + simple_macro!(3301); + simple_macro!(3302); + simple_macro!(3303); + simple_macro!(3304); + simple_macro!(3305); + simple_macro!(3306); + simple_macro!(3307); + simple_macro!(3308); + simple_macro!(3309); + simple_macro!(3310); + simple_macro!(3311); + simple_macro!(3312); + simple_macro!(3313); + simple_macro!(3314); + simple_macro!(3315); + simple_macro!(3316); + simple_macro!(3317); + simple_macro!(3318); + simple_macro!(3319); + simple_macro!(3320); + simple_macro!(3321); + simple_macro!(3322); + simple_macro!(3323); + simple_macro!(3324); + simple_macro!(3325); + simple_macro!(3326); + simple_macro!(3327); + simple_macro!(3328); + simple_macro!(3329); + simple_macro!(3330); + simple_macro!(3331); + simple_macro!(3332); + simple_macro!(3333); + simple_macro!(3334); + simple_macro!(3335); + simple_macro!(3336); + simple_macro!(3337); + simple_macro!(3338); + simple_macro!(3339); + simple_macro!(3340); + simple_macro!(3341); + simple_macro!(3342); + simple_macro!(3343); + simple_macro!(3344); + simple_macro!(3345); + simple_macro!(3346); + simple_macro!(3347); + simple_macro!(3348); + simple_macro!(3349); + simple_macro!(3350); + simple_macro!(3351); + simple_macro!(3352); + simple_macro!(3353); + simple_macro!(3354); + simple_macro!(3355); + simple_macro!(3356); + simple_macro!(3357); + simple_macro!(3358); + simple_macro!(3359); + simple_macro!(3360); + simple_macro!(3361); + simple_macro!(3362); + simple_macro!(3363); + simple_macro!(3364); + simple_macro!(3365); + simple_macro!(3366); + simple_macro!(3367); + simple_macro!(3368); + simple_macro!(3369); + simple_macro!(3370); + simple_macro!(3371); + simple_macro!(3372); + simple_macro!(3373); + simple_macro!(3374); + simple_macro!(3375); + simple_macro!(3376); + simple_macro!(3377); + simple_macro!(3378); + simple_macro!(3379); + simple_macro!(3380); + simple_macro!(3381); + simple_macro!(3382); + simple_macro!(3383); + simple_macro!(3384); + simple_macro!(3385); + simple_macro!(3386); + simple_macro!(3387); + simple_macro!(3388); + simple_macro!(3389); + simple_macro!(3390); + simple_macro!(3391); + simple_macro!(3392); + simple_macro!(3393); + simple_macro!(3394); + simple_macro!(3395); + simple_macro!(3396); + simple_macro!(3397); + simple_macro!(3398); + simple_macro!(3399); + simple_macro!(3400); + simple_macro!(3401); + simple_macro!(3402); + simple_macro!(3403); + simple_macro!(3404); + simple_macro!(3405); + simple_macro!(3406); + simple_macro!(3407); + simple_macro!(3408); + simple_macro!(3409); + simple_macro!(3410); + simple_macro!(3411); + simple_macro!(3412); + simple_macro!(3413); + simple_macro!(3414); + simple_macro!(3415); + simple_macro!(3416); + simple_macro!(3417); + simple_macro!(3418); + simple_macro!(3419); + simple_macro!(3420); + simple_macro!(3421); + simple_macro!(3422); + simple_macro!(3423); + simple_macro!(3424); + simple_macro!(3425); + simple_macro!(3426); + simple_macro!(3427); + simple_macro!(3428); + simple_macro!(3429); + simple_macro!(3430); + simple_macro!(3431); + simple_macro!(3432); + simple_macro!(3433); + simple_macro!(3434); + simple_macro!(3435); + simple_macro!(3436); + simple_macro!(3437); + simple_macro!(3438); + simple_macro!(3439); + simple_macro!(3440); + simple_macro!(3441); + simple_macro!(3442); + simple_macro!(3443); + simple_macro!(3444); + simple_macro!(3445); + simple_macro!(3446); + simple_macro!(3447); + simple_macro!(3448); + simple_macro!(3449); + simple_macro!(3450); + simple_macro!(3451); + simple_macro!(3452); + simple_macro!(3453); + simple_macro!(3454); + simple_macro!(3455); + simple_macro!(3456); + simple_macro!(3457); + simple_macro!(3458); + simple_macro!(3459); + simple_macro!(3460); + simple_macro!(3461); + simple_macro!(3462); + simple_macro!(3463); + simple_macro!(3464); + simple_macro!(3465); + simple_macro!(3466); + simple_macro!(3467); + simple_macro!(3468); + simple_macro!(3469); + simple_macro!(3470); + simple_macro!(3471); + simple_macro!(3472); + simple_macro!(3473); + simple_macro!(3474); + simple_macro!(3475); + simple_macro!(3476); + simple_macro!(3477); + simple_macro!(3478); + simple_macro!(3479); + simple_macro!(3480); + simple_macro!(3481); + simple_macro!(3482); + simple_macro!(3483); + simple_macro!(3484); + simple_macro!(3485); + simple_macro!(3486); + simple_macro!(3487); + simple_macro!(3488); + simple_macro!(3489); + simple_macro!(3490); + simple_macro!(3491); + simple_macro!(3492); + simple_macro!(3493); + simple_macro!(3494); + simple_macro!(3495); + simple_macro!(3496); + simple_macro!(3497); + simple_macro!(3498); + simple_macro!(3499); + simple_macro!(3500); + simple_macro!(3501); + simple_macro!(3502); + simple_macro!(3503); + simple_macro!(3504); + simple_macro!(3505); + simple_macro!(3506); + simple_macro!(3507); + simple_macro!(3508); + simple_macro!(3509); + simple_macro!(3510); + simple_macro!(3511); + simple_macro!(3512); + simple_macro!(3513); + simple_macro!(3514); + simple_macro!(3515); + simple_macro!(3516); + simple_macro!(3517); + simple_macro!(3518); + simple_macro!(3519); + simple_macro!(3520); + simple_macro!(3521); + simple_macro!(3522); + simple_macro!(3523); + simple_macro!(3524); + simple_macro!(3525); + simple_macro!(3526); + simple_macro!(3527); + simple_macro!(3528); + simple_macro!(3529); + simple_macro!(3530); + simple_macro!(3531); + simple_macro!(3532); + simple_macro!(3533); + simple_macro!(3534); + simple_macro!(3535); + simple_macro!(3536); + simple_macro!(3537); + simple_macro!(3538); + simple_macro!(3539); + simple_macro!(3540); + simple_macro!(3541); + simple_macro!(3542); + simple_macro!(3543); + simple_macro!(3544); + simple_macro!(3545); + simple_macro!(3546); + simple_macro!(3547); + simple_macro!(3548); + simple_macro!(3549); + simple_macro!(3550); + simple_macro!(3551); + simple_macro!(3552); + simple_macro!(3553); + simple_macro!(3554); + simple_macro!(3555); + simple_macro!(3556); + simple_macro!(3557); + simple_macro!(3558); + simple_macro!(3559); + simple_macro!(3560); + simple_macro!(3561); + simple_macro!(3562); + simple_macro!(3563); + simple_macro!(3564); + simple_macro!(3565); + simple_macro!(3566); + simple_macro!(3567); + simple_macro!(3568); + simple_macro!(3569); + simple_macro!(3570); + simple_macro!(3571); + simple_macro!(3572); + simple_macro!(3573); + simple_macro!(3574); + simple_macro!(3575); + simple_macro!(3576); + simple_macro!(3577); + simple_macro!(3578); + simple_macro!(3579); + simple_macro!(3580); + simple_macro!(3581); + simple_macro!(3582); + simple_macro!(3583); + simple_macro!(3584); + simple_macro!(3585); + simple_macro!(3586); + simple_macro!(3587); + simple_macro!(3588); + simple_macro!(3589); + simple_macro!(3590); + simple_macro!(3591); + simple_macro!(3592); + simple_macro!(3593); + simple_macro!(3594); + simple_macro!(3595); + simple_macro!(3596); + simple_macro!(3597); + simple_macro!(3598); + simple_macro!(3599); + simple_macro!(3600); + simple_macro!(3601); + simple_macro!(3602); + simple_macro!(3603); + simple_macro!(3604); + simple_macro!(3605); + simple_macro!(3606); + simple_macro!(3607); + simple_macro!(3608); + simple_macro!(3609); + simple_macro!(3610); + simple_macro!(3611); + simple_macro!(3612); + simple_macro!(3613); + simple_macro!(3614); + simple_macro!(3615); + simple_macro!(3616); + simple_macro!(3617); + simple_macro!(3618); + simple_macro!(3619); + simple_macro!(3620); + simple_macro!(3621); + simple_macro!(3622); + simple_macro!(3623); + simple_macro!(3624); + simple_macro!(3625); + simple_macro!(3626); + simple_macro!(3627); + simple_macro!(3628); + simple_macro!(3629); + simple_macro!(3630); + simple_macro!(3631); + simple_macro!(3632); + simple_macro!(3633); + simple_macro!(3634); + simple_macro!(3635); + simple_macro!(3636); + simple_macro!(3637); + simple_macro!(3638); + simple_macro!(3639); + simple_macro!(3640); + simple_macro!(3641); + simple_macro!(3642); + simple_macro!(3643); + simple_macro!(3644); + simple_macro!(3645); + simple_macro!(3646); + simple_macro!(3647); + simple_macro!(3648); + simple_macro!(3649); + simple_macro!(3650); + simple_macro!(3651); + simple_macro!(3652); + simple_macro!(3653); + simple_macro!(3654); + simple_macro!(3655); + simple_macro!(3656); + simple_macro!(3657); + simple_macro!(3658); + simple_macro!(3659); + simple_macro!(3660); + simple_macro!(3661); + simple_macro!(3662); + simple_macro!(3663); + simple_macro!(3664); + simple_macro!(3665); + simple_macro!(3666); + simple_macro!(3667); + simple_macro!(3668); + simple_macro!(3669); + simple_macro!(3670); + simple_macro!(3671); + simple_macro!(3672); + simple_macro!(3673); + simple_macro!(3674); + simple_macro!(3675); + simple_macro!(3676); + simple_macro!(3677); + simple_macro!(3678); + simple_macro!(3679); + simple_macro!(3680); + simple_macro!(3681); + simple_macro!(3682); + simple_macro!(3683); + simple_macro!(3684); + simple_macro!(3685); + simple_macro!(3686); + simple_macro!(3687); + simple_macro!(3688); + simple_macro!(3689); + simple_macro!(3690); + simple_macro!(3691); + simple_macro!(3692); + simple_macro!(3693); + simple_macro!(3694); + simple_macro!(3695); + simple_macro!(3696); + simple_macro!(3697); + simple_macro!(3698); + simple_macro!(3699); + simple_macro!(3700); + simple_macro!(3701); + simple_macro!(3702); + simple_macro!(3703); + simple_macro!(3704); + simple_macro!(3705); + simple_macro!(3706); + simple_macro!(3707); + simple_macro!(3708); + simple_macro!(3709); + simple_macro!(3710); + simple_macro!(3711); + simple_macro!(3712); + simple_macro!(3713); + simple_macro!(3714); + simple_macro!(3715); + simple_macro!(3716); + simple_macro!(3717); + simple_macro!(3718); + simple_macro!(3719); + simple_macro!(3720); + simple_macro!(3721); + simple_macro!(3722); + simple_macro!(3723); + simple_macro!(3724); + simple_macro!(3725); + simple_macro!(3726); + simple_macro!(3727); + simple_macro!(3728); + simple_macro!(3729); + simple_macro!(3730); + simple_macro!(3731); + simple_macro!(3732); + simple_macro!(3733); + simple_macro!(3734); + simple_macro!(3735); + simple_macro!(3736); + simple_macro!(3737); + simple_macro!(3738); + simple_macro!(3739); + simple_macro!(3740); + simple_macro!(3741); + simple_macro!(3742); + simple_macro!(3743); + simple_macro!(3744); + simple_macro!(3745); + simple_macro!(3746); + simple_macro!(3747); + simple_macro!(3748); + simple_macro!(3749); + simple_macro!(3750); + simple_macro!(3751); + simple_macro!(3752); + simple_macro!(3753); + simple_macro!(3754); + simple_macro!(3755); + simple_macro!(3756); + simple_macro!(3757); + simple_macro!(3758); + simple_macro!(3759); + simple_macro!(3760); + simple_macro!(3761); + simple_macro!(3762); + simple_macro!(3763); + simple_macro!(3764); + simple_macro!(3765); + simple_macro!(3766); + simple_macro!(3767); + simple_macro!(3768); + simple_macro!(3769); + simple_macro!(3770); + simple_macro!(3771); + simple_macro!(3772); + simple_macro!(3773); + simple_macro!(3774); + simple_macro!(3775); + simple_macro!(3776); + simple_macro!(3777); + simple_macro!(3778); + simple_macro!(3779); + simple_macro!(3780); + simple_macro!(3781); + simple_macro!(3782); + simple_macro!(3783); + simple_macro!(3784); + simple_macro!(3785); + simple_macro!(3786); + simple_macro!(3787); + simple_macro!(3788); + simple_macro!(3789); + simple_macro!(3790); + simple_macro!(3791); + simple_macro!(3792); + simple_macro!(3793); + simple_macro!(3794); + simple_macro!(3795); + simple_macro!(3796); + simple_macro!(3797); + simple_macro!(3798); + simple_macro!(3799); + simple_macro!(3800); + simple_macro!(3801); + simple_macro!(3802); + simple_macro!(3803); + simple_macro!(3804); + simple_macro!(3805); + simple_macro!(3806); + simple_macro!(3807); + simple_macro!(3808); + simple_macro!(3809); + simple_macro!(3810); + simple_macro!(3811); + simple_macro!(3812); + simple_macro!(3813); + simple_macro!(3814); + simple_macro!(3815); + simple_macro!(3816); + simple_macro!(3817); + simple_macro!(3818); + simple_macro!(3819); + simple_macro!(3820); + simple_macro!(3821); + simple_macro!(3822); + simple_macro!(3823); + simple_macro!(3824); + simple_macro!(3825); + simple_macro!(3826); + simple_macro!(3827); + simple_macro!(3828); + simple_macro!(3829); + simple_macro!(3830); + simple_macro!(3831); + simple_macro!(3832); + simple_macro!(3833); + simple_macro!(3834); + simple_macro!(3835); + simple_macro!(3836); + simple_macro!(3837); + simple_macro!(3838); + simple_macro!(3839); + simple_macro!(3840); + simple_macro!(3841); + simple_macro!(3842); + simple_macro!(3843); + simple_macro!(3844); + simple_macro!(3845); + simple_macro!(3846); + simple_macro!(3847); + simple_macro!(3848); + simple_macro!(3849); + simple_macro!(3850); + simple_macro!(3851); + simple_macro!(3852); + simple_macro!(3853); + simple_macro!(3854); + simple_macro!(3855); + simple_macro!(3856); + simple_macro!(3857); + simple_macro!(3858); + simple_macro!(3859); + simple_macro!(3860); + simple_macro!(3861); + simple_macro!(3862); + simple_macro!(3863); + simple_macro!(3864); + simple_macro!(3865); + simple_macro!(3866); + simple_macro!(3867); + simple_macro!(3868); + simple_macro!(3869); + simple_macro!(3870); + simple_macro!(3871); + simple_macro!(3872); + simple_macro!(3873); + simple_macro!(3874); + simple_macro!(3875); + simple_macro!(3876); + simple_macro!(3877); + simple_macro!(3878); + simple_macro!(3879); + simple_macro!(3880); + simple_macro!(3881); + simple_macro!(3882); + simple_macro!(3883); + simple_macro!(3884); + simple_macro!(3885); + simple_macro!(3886); + simple_macro!(3887); + simple_macro!(3888); + simple_macro!(3889); + simple_macro!(3890); + simple_macro!(3891); + simple_macro!(3892); + simple_macro!(3893); + simple_macro!(3894); + simple_macro!(3895); + simple_macro!(3896); + simple_macro!(3897); + simple_macro!(3898); + simple_macro!(3899); + simple_macro!(3900); + simple_macro!(3901); + simple_macro!(3902); + simple_macro!(3903); + simple_macro!(3904); + simple_macro!(3905); + simple_macro!(3906); + simple_macro!(3907); + simple_macro!(3908); + simple_macro!(3909); + simple_macro!(3910); + simple_macro!(3911); + simple_macro!(3912); + simple_macro!(3913); + simple_macro!(3914); + simple_macro!(3915); + simple_macro!(3916); + simple_macro!(3917); + simple_macro!(3918); + simple_macro!(3919); + simple_macro!(3920); + simple_macro!(3921); + simple_macro!(3922); + simple_macro!(3923); + simple_macro!(3924); + simple_macro!(3925); + simple_macro!(3926); + simple_macro!(3927); + simple_macro!(3928); + simple_macro!(3929); + simple_macro!(3930); + simple_macro!(3931); + simple_macro!(3932); + simple_macro!(3933); + simple_macro!(3934); + simple_macro!(3935); + simple_macro!(3936); + simple_macro!(3937); + simple_macro!(3938); + simple_macro!(3939); + simple_macro!(3940); + simple_macro!(3941); + simple_macro!(3942); + simple_macro!(3943); + simple_macro!(3944); + simple_macro!(3945); + simple_macro!(3946); + simple_macro!(3947); + simple_macro!(3948); + simple_macro!(3949); + simple_macro!(3950); + simple_macro!(3951); + simple_macro!(3952); + simple_macro!(3953); + simple_macro!(3954); + simple_macro!(3955); + simple_macro!(3956); + simple_macro!(3957); + simple_macro!(3958); + simple_macro!(3959); + simple_macro!(3960); + simple_macro!(3961); + simple_macro!(3962); + simple_macro!(3963); + simple_macro!(3964); + simple_macro!(3965); + simple_macro!(3966); + simple_macro!(3967); + simple_macro!(3968); + simple_macro!(3969); + simple_macro!(3970); + simple_macro!(3971); + simple_macro!(3972); + simple_macro!(3973); + simple_macro!(3974); + simple_macro!(3975); + simple_macro!(3976); + simple_macro!(3977); + simple_macro!(3978); + simple_macro!(3979); + simple_macro!(3980); + simple_macro!(3981); + simple_macro!(3982); + simple_macro!(3983); + simple_macro!(3984); + simple_macro!(3985); + simple_macro!(3986); + simple_macro!(3987); + simple_macro!(3988); + simple_macro!(3989); + simple_macro!(3990); + simple_macro!(3991); + simple_macro!(3992); + simple_macro!(3993); + simple_macro!(3994); + simple_macro!(3995); + simple_macro!(3996); + simple_macro!(3997); + simple_macro!(3998); + simple_macro!(3999); + simple_macro!(4000); + simple_macro!(4001); + simple_macro!(4002); + simple_macro!(4003); + simple_macro!(4004); + simple_macro!(4005); + simple_macro!(4006); + simple_macro!(4007); + simple_macro!(4008); + simple_macro!(4009); + simple_macro!(4010); + simple_macro!(4011); + simple_macro!(4012); + simple_macro!(4013); + simple_macro!(4014); + simple_macro!(4015); + simple_macro!(4016); + simple_macro!(4017); + simple_macro!(4018); + simple_macro!(4019); + simple_macro!(4020); + simple_macro!(4021); + simple_macro!(4022); + simple_macro!(4023); + simple_macro!(4024); + simple_macro!(4025); + simple_macro!(4026); + simple_macro!(4027); + simple_macro!(4028); + simple_macro!(4029); + simple_macro!(4030); + simple_macro!(4031); + simple_macro!(4032); + simple_macro!(4033); + simple_macro!(4034); + simple_macro!(4035); + simple_macro!(4036); + simple_macro!(4037); + simple_macro!(4038); + simple_macro!(4039); + simple_macro!(4040); + simple_macro!(4041); + simple_macro!(4042); + simple_macro!(4043); + simple_macro!(4044); + simple_macro!(4045); + simple_macro!(4046); + simple_macro!(4047); + simple_macro!(4048); + simple_macro!(4049); + simple_macro!(4050); + simple_macro!(4051); + simple_macro!(4052); + simple_macro!(4053); + simple_macro!(4054); + simple_macro!(4055); + simple_macro!(4056); + simple_macro!(4057); + simple_macro!(4058); + simple_macro!(4059); + simple_macro!(4060); + simple_macro!(4061); + simple_macro!(4062); + simple_macro!(4063); + simple_macro!(4064); + simple_macro!(4065); + simple_macro!(4066); + simple_macro!(4067); + simple_macro!(4068); + simple_macro!(4069); + simple_macro!(4070); + simple_macro!(4071); + simple_macro!(4072); + simple_macro!(4073); + simple_macro!(4074); + simple_macro!(4075); + simple_macro!(4076); + simple_macro!(4077); + simple_macro!(4078); + simple_macro!(4079); + simple_macro!(4080); + simple_macro!(4081); + simple_macro!(4082); + simple_macro!(4083); + simple_macro!(4084); + simple_macro!(4085); + simple_macro!(4086); + simple_macro!(4087); + simple_macro!(4088); + simple_macro!(4089); + simple_macro!(4090); + simple_macro!(4091); + simple_macro!(4092); + simple_macro!(4093); + simple_macro!(4094); + simple_macro!(4095); + simple_macro!(4096); + simple_macro!(4097); +} + +fn main() { + uncollapsed_debuginfo(); +} diff --git a/tests/ui/delegation/unsupported.rs b/tests/ui/delegation/unsupported.rs index b35af76da3e..af1c20976d7 100644 --- a/tests/ui/delegation/unsupported.rs +++ b/tests/ui/delegation/unsupported.rs @@ -10,15 +10,11 @@ mod opaque { mod to_reuse { use super::Trait; - pub fn opaque_ret() -> impl Trait { unimplemented!() } - //~^ warn: this function depends on never type fallback being `()` - //~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + pub fn opaque_ret() -> impl Trait { () } } trait ToReuse { - fn opaque_ret() -> impl Trait { unimplemented!() } - //~^ warn: this function depends on never type fallback being `()` - //~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + fn opaque_ret() -> impl Trait { () } } // FIXME: Inherited `impl Trait`s create query cycles when used inside trait impls. diff --git a/tests/ui/delegation/unsupported.stderr b/tests/ui/delegation/unsupported.stderr index 9391763dca2..2b0bcf9d84e 100644 --- a/tests/ui/delegation/unsupported.stderr +++ b/tests/ui/delegation/unsupported.stderr @@ -1,74 +1,43 @@ -error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/unsupported.rs:25:5: 25:24>::{synthetic#0}` - --> $DIR/unsupported.rs:26:25 +error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/unsupported.rs:21:5: 21:24>::{synthetic#0}` + --> $DIR/unsupported.rs:22:25 | LL | reuse to_reuse::opaque_ret; | ^^^^^^^^^^ | note: ...which requires comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process... - --> $DIR/unsupported.rs:26:25 + --> $DIR/unsupported.rs:22:25 | LL | reuse to_reuse::opaque_ret; | ^^^^^^^^^^ - = note: ...which again requires computing type of `opaque::<impl at $DIR/unsupported.rs:25:5: 25:24>::{synthetic#0}`, completing the cycle -note: cycle used when checking that `opaque::<impl at $DIR/unsupported.rs:25:5: 25:24>` is well-formed - --> $DIR/unsupported.rs:25:5 + = note: ...which again requires computing type of `opaque::<impl at $DIR/unsupported.rs:21:5: 21:24>::{synthetic#0}`, completing the cycle +note: cycle used when checking that `opaque::<impl at $DIR/unsupported.rs:21:5: 21:24>` is well-formed + --> $DIR/unsupported.rs:21:5 | LL | impl ToReuse for u8 { | ^^^^^^^^^^^^^^^^^^^ = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information -warning: this function depends on never type fallback being `()` - --> $DIR/unsupported.rs:13:9 - | -LL | pub fn opaque_ret() -> impl Trait { unimplemented!() } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> - = help: specify the types explicitly -note: in edition 2024, the requirement `!: opaque::Trait` will fail - --> $DIR/unsupported.rs:13:32 - | -LL | pub fn opaque_ret() -> impl Trait { unimplemented!() } - | ^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default - -warning: this function depends on never type fallback being `()` - --> $DIR/unsupported.rs:19:9 - | -LL | fn opaque_ret() -> impl Trait { unimplemented!() } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> - = help: specify the types explicitly -note: in edition 2024, the requirement `!: opaque::Trait` will fail - --> $DIR/unsupported.rs:19:28 - | -LL | fn opaque_ret() -> impl Trait { unimplemented!() } - | ^^^^^^^^^^ - -error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/unsupported.rs:28:5: 28:25>::{synthetic#0}` - --> $DIR/unsupported.rs:29:24 +error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/unsupported.rs:24:5: 24:25>::{synthetic#0}` + --> $DIR/unsupported.rs:25:24 | LL | reuse ToReuse::opaque_ret; | ^^^^^^^^^^ | note: ...which requires comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process... - --> $DIR/unsupported.rs:29:24 + --> $DIR/unsupported.rs:25:24 | LL | reuse ToReuse::opaque_ret; | ^^^^^^^^^^ - = note: ...which again requires computing type of `opaque::<impl at $DIR/unsupported.rs:28:5: 28:25>::{synthetic#0}`, completing the cycle -note: cycle used when checking that `opaque::<impl at $DIR/unsupported.rs:28:5: 28:25>` is well-formed - --> $DIR/unsupported.rs:28:5 + = note: ...which again requires computing type of `opaque::<impl at $DIR/unsupported.rs:24:5: 24:25>::{synthetic#0}`, completing the cycle +note: cycle used when checking that `opaque::<impl at $DIR/unsupported.rs:24:5: 24:25>` is well-formed + --> $DIR/unsupported.rs:24:5 | LL | impl ToReuse for u16 { | ^^^^^^^^^^^^^^^^^^^^ = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information error: recursive delegation is not supported yet - --> $DIR/unsupported.rs:42:22 + --> $DIR/unsupported.rs:38:22 | LL | pub reuse to_reuse2::foo; | --- callee defined here @@ -77,14 +46,14 @@ LL | reuse to_reuse1::foo; | ^^^ error[E0283]: type annotations needed - --> $DIR/unsupported.rs:52:18 + --> $DIR/unsupported.rs:48:18 | LL | reuse Trait::foo; | ^^^ cannot infer type | = note: cannot satisfy `_: effects::Trait` -error: aborting due to 4 previous errors; 2 warnings emitted +error: aborting due to 4 previous errors Some errors have detailed explanations: E0283, E0391. For more information about an error, try `rustc --explain E0283`. diff --git a/tests/ui/diagnostic_namespace/deny_malformed_attribute.rs b/tests/ui/diagnostic_namespace/deny_malformed_attribute.rs index 1d946a14aff..a46c856d38e 100644 --- a/tests/ui/diagnostic_namespace/deny_malformed_attribute.rs +++ b/tests/ui/diagnostic_namespace/deny_malformed_attribute.rs @@ -1,3 +1,5 @@ +//@ reference: attributes.diagnostic.namespace.unknown-invalid-syntax + #![deny(unknown_or_malformed_diagnostic_attributes)] #[diagnostic::unknown_attribute] diff --git a/tests/ui/diagnostic_namespace/deny_malformed_attribute.stderr b/tests/ui/diagnostic_namespace/deny_malformed_attribute.stderr index a646d3613de..32be9db5317 100644 --- a/tests/ui/diagnostic_namespace/deny_malformed_attribute.stderr +++ b/tests/ui/diagnostic_namespace/deny_malformed_attribute.stderr @@ -1,11 +1,11 @@ error: unknown diagnostic attribute - --> $DIR/deny_malformed_attribute.rs:3:15 + --> $DIR/deny_malformed_attribute.rs:5:15 | LL | #[diagnostic::unknown_attribute] | ^^^^^^^^^^^^^^^^^ | note: the lint level is defined here - --> $DIR/deny_malformed_attribute.rs:1:9 + --> $DIR/deny_malformed_attribute.rs:3:9 | LL | #![deny(unknown_or_malformed_diagnostic_attributes)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/diagnostic_namespace/malformed_foreign_on_unimplemented.rs b/tests/ui/diagnostic_namespace/malformed_foreign_on_unimplemented.rs index 8b7467a17d0..b90dd0c7c94 100644 --- a/tests/ui/diagnostic_namespace/malformed_foreign_on_unimplemented.rs +++ b/tests/ui/diagnostic_namespace/malformed_foreign_on_unimplemented.rs @@ -1,5 +1,6 @@ //@ edition:2021 //@ aux-build:bad_on_unimplemented.rs +//@ reference: attributes.diagnostic.on_unimplemented.syntax // Do not ICE when encountering a malformed `#[diagnostic::on_unimplemented]` annotation in a // dependency when incorrectly used (#124651). diff --git a/tests/ui/diagnostic_namespace/malformed_foreign_on_unimplemented.stderr b/tests/ui/diagnostic_namespace/malformed_foreign_on_unimplemented.stderr index c3e56550b70..f1258ad6b9a 100644 --- a/tests/ui/diagnostic_namespace/malformed_foreign_on_unimplemented.stderr +++ b/tests/ui/diagnostic_namespace/malformed_foreign_on_unimplemented.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `(): bad_on_unimplemented::MissingAttr` is not satisfied - --> $DIR/malformed_foreign_on_unimplemented.rs:22:18 + --> $DIR/malformed_foreign_on_unimplemented.rs:23:18 | LL | missing_attr(()); | ------------ ^^ the trait `bad_on_unimplemented::MissingAttr` is not implemented for `()` @@ -7,13 +7,13 @@ LL | missing_attr(()); | required by a bound introduced by this call | note: required by a bound in `missing_attr` - --> $DIR/malformed_foreign_on_unimplemented.rs:11:20 + --> $DIR/malformed_foreign_on_unimplemented.rs:12:20 | LL | fn missing_attr<T: MissingAttr>(_: T) {} | ^^^^^^^^^^^ required by this bound in `missing_attr` error[E0277]: the trait bound `(): bad_on_unimplemented::DuplicateAttr` is not satisfied - --> $DIR/malformed_foreign_on_unimplemented.rs:23:20 + --> $DIR/malformed_foreign_on_unimplemented.rs:24:20 | LL | duplicate_attr(()); | -------------- ^^ a @@ -22,13 +22,13 @@ LL | duplicate_attr(()); | = help: the trait `bad_on_unimplemented::DuplicateAttr` is not implemented for `()` note: required by a bound in `duplicate_attr` - --> $DIR/malformed_foreign_on_unimplemented.rs:12:22 + --> $DIR/malformed_foreign_on_unimplemented.rs:13:22 | LL | fn duplicate_attr<T: DuplicateAttr>(_: T) {} | ^^^^^^^^^^^^^ required by this bound in `duplicate_attr` error[E0277]: the trait bound `(): bad_on_unimplemented::NotMetaList` is not satisfied - --> $DIR/malformed_foreign_on_unimplemented.rs:24:19 + --> $DIR/malformed_foreign_on_unimplemented.rs:25:19 | LL | not_meta_list(()); | ------------- ^^ the trait `bad_on_unimplemented::NotMetaList` is not implemented for `()` @@ -36,13 +36,13 @@ LL | not_meta_list(()); | required by a bound introduced by this call | note: required by a bound in `not_meta_list` - --> $DIR/malformed_foreign_on_unimplemented.rs:13:21 + --> $DIR/malformed_foreign_on_unimplemented.rs:14:21 | LL | fn not_meta_list<T: NotMetaList>(_: T) {} | ^^^^^^^^^^^ required by this bound in `not_meta_list` error[E0277]: the trait bound `(): bad_on_unimplemented::Empty` is not satisfied - --> $DIR/malformed_foreign_on_unimplemented.rs:25:11 + --> $DIR/malformed_foreign_on_unimplemented.rs:26:11 | LL | empty(()); | ----- ^^ the trait `bad_on_unimplemented::Empty` is not implemented for `()` @@ -50,13 +50,13 @@ LL | empty(()); | required by a bound introduced by this call | note: required by a bound in `empty` - --> $DIR/malformed_foreign_on_unimplemented.rs:14:13 + --> $DIR/malformed_foreign_on_unimplemented.rs:15:13 | LL | fn empty<T: Empty>(_: T) {} | ^^^^^ required by this bound in `empty` error[E0277]: the trait bound `(): bad_on_unimplemented::WrongDelim` is not satisfied - --> $DIR/malformed_foreign_on_unimplemented.rs:26:17 + --> $DIR/malformed_foreign_on_unimplemented.rs:27:17 | LL | wrong_delim(()); | ----------- ^^ the trait `bad_on_unimplemented::WrongDelim` is not implemented for `()` @@ -64,13 +64,13 @@ LL | wrong_delim(()); | required by a bound introduced by this call | note: required by a bound in `wrong_delim` - --> $DIR/malformed_foreign_on_unimplemented.rs:15:19 + --> $DIR/malformed_foreign_on_unimplemented.rs:16:19 | LL | fn wrong_delim<T: WrongDelim>(_: T) {} | ^^^^^^^^^^ required by this bound in `wrong_delim` error[E0277]: the trait bound `(): bad_on_unimplemented::BadFormatter<()>` is not satisfied - --> $DIR/malformed_foreign_on_unimplemented.rs:27:19 + --> $DIR/malformed_foreign_on_unimplemented.rs:28:19 | LL | bad_formatter(()); | ------------- ^^ () @@ -79,13 +79,13 @@ LL | bad_formatter(()); | = help: the trait `bad_on_unimplemented::BadFormatter<()>` is not implemented for `()` note: required by a bound in `bad_formatter` - --> $DIR/malformed_foreign_on_unimplemented.rs:16:21 + --> $DIR/malformed_foreign_on_unimplemented.rs:17:21 | LL | fn bad_formatter<T: BadFormatter<()>>(_: T) {} | ^^^^^^^^^^^^^^^^ required by this bound in `bad_formatter` error[E0277]: the trait bound `(): bad_on_unimplemented::NoImplicitArgs` is not satisfied - --> $DIR/malformed_foreign_on_unimplemented.rs:28:22 + --> $DIR/malformed_foreign_on_unimplemented.rs:29:22 | LL | no_implicit_args(()); | ---------------- ^^ test {} @@ -94,13 +94,13 @@ LL | no_implicit_args(()); | = help: the trait `bad_on_unimplemented::NoImplicitArgs` is not implemented for `()` note: required by a bound in `no_implicit_args` - --> $DIR/malformed_foreign_on_unimplemented.rs:17:24 + --> $DIR/malformed_foreign_on_unimplemented.rs:18:24 | LL | fn no_implicit_args<T: NoImplicitArgs>(_: T) {} | ^^^^^^^^^^^^^^ required by this bound in `no_implicit_args` error[E0277]: the trait bound `(): bad_on_unimplemented::MissingArg` is not satisfied - --> $DIR/malformed_foreign_on_unimplemented.rs:29:17 + --> $DIR/malformed_foreign_on_unimplemented.rs:30:17 | LL | missing_arg(()); | ----------- ^^ {missing} @@ -109,13 +109,13 @@ LL | missing_arg(()); | = help: the trait `bad_on_unimplemented::MissingArg` is not implemented for `()` note: required by a bound in `missing_arg` - --> $DIR/malformed_foreign_on_unimplemented.rs:18:19 + --> $DIR/malformed_foreign_on_unimplemented.rs:19:19 | LL | fn missing_arg<T: MissingArg>(_: T) {} | ^^^^^^^^^^ required by this bound in `missing_arg` error[E0277]: the trait bound `(): bad_on_unimplemented::BadArg` is not satisfied - --> $DIR/malformed_foreign_on_unimplemented.rs:30:13 + --> $DIR/malformed_foreign_on_unimplemented.rs:31:13 | LL | bad_arg(()); | ------- ^^ {_} @@ -124,7 +124,7 @@ LL | bad_arg(()); | = help: the trait `bad_on_unimplemented::BadArg` is not implemented for `()` note: required by a bound in `bad_arg` - --> $DIR/malformed_foreign_on_unimplemented.rs:19:15 + --> $DIR/malformed_foreign_on_unimplemented.rs:20:15 | LL | fn bad_arg<T: BadArg>(_: T) {} | ^^^^^^ required by this bound in `bad_arg` diff --git a/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.rs b/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.rs index f6957b1448d..02c1352482c 100644 --- a/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.rs +++ b/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.rs @@ -1,4 +1,5 @@ //@ check-pass +//@ reference: attributes.diagnostic.namespace.unknown-invalid-syntax #[diagnostic::non_existing_attribute] //~^WARN unknown diagnostic attribute pub trait Bar { diff --git a/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.stderr b/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.stderr index c073ec9b103..753077b365e 100644 --- a/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.stderr +++ b/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.stderr @@ -1,5 +1,5 @@ warning: unknown diagnostic attribute - --> $DIR/non_existing_attributes_accepted.rs:2:15 + --> $DIR/non_existing_attributes_accepted.rs:3:15 | LL | #[diagnostic::non_existing_attribute] | ^^^^^^^^^^^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | #[diagnostic::non_existing_attribute] = note: `#[warn(unknown_or_malformed_diagnostic_attributes)]` on by default warning: unknown diagnostic attribute - --> $DIR/non_existing_attributes_accepted.rs:7:15 + --> $DIR/non_existing_attributes_accepted.rs:8:15 | LL | #[diagnostic::non_existing_attribute(with_option = "foo")] | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.rs b/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.rs index 3ca58b28181..44f269eb967 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.rs +++ b/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.rs @@ -1,3 +1,4 @@ +//@ reference: attributes.diagnostic.on_unimplemented.invalid-string #[diagnostic::on_unimplemented(message = "{{Test } thing")] //~^WARN unmatched `}` found //~|WARN unmatched `}` found diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.stderr index b4ed06cb63d..7fd51c7527f 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.stderr @@ -1,5 +1,5 @@ warning: unmatched `}` found - --> $DIR/broken_format.rs:1:32 + --> $DIR/broken_format.rs:2:32 | LL | #[diagnostic::on_unimplemented(message = "{{Test } thing")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | #[diagnostic::on_unimplemented(message = "{{Test } thing")] = note: `#[warn(unknown_or_malformed_diagnostic_attributes)]` on by default warning: positional format arguments are not allowed here - --> $DIR/broken_format.rs:6:32 + --> $DIR/broken_format.rs:7:32 | LL | #[diagnostic::on_unimplemented(message = "Test {}")] | ^^^^^^^^^^^^^^^^^^^ @@ -15,7 +15,7 @@ LL | #[diagnostic::on_unimplemented(message = "Test {}")] = help: only named format arguments with the name of one of the generic types are allowed in this context warning: positional format arguments are not allowed here - --> $DIR/broken_format.rs:11:32 + --> $DIR/broken_format.rs:12:32 | LL | #[diagnostic::on_unimplemented(message = "Test {1:}")] | ^^^^^^^^^^^^^^^^^^^^^ @@ -23,7 +23,7 @@ LL | #[diagnostic::on_unimplemented(message = "Test {1:}")] = help: only named format arguments with the name of one of the generic types are allowed in this context warning: invalid format specifier - --> $DIR/broken_format.rs:16:32 + --> $DIR/broken_format.rs:17:32 | LL | #[diagnostic::on_unimplemented(message = "Test {Self:123}")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -31,19 +31,19 @@ LL | #[diagnostic::on_unimplemented(message = "Test {Self:123}")] = help: no format specifier are supported in this position warning: expected `}`, found `!` - --> $DIR/broken_format.rs:21:32 + --> $DIR/broken_format.rs:22:32 | LL | #[diagnostic::on_unimplemented(message = "Test {Self:!}")] | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unmatched `}` found - --> $DIR/broken_format.rs:21:32 + --> $DIR/broken_format.rs:22:32 | LL | #[diagnostic::on_unimplemented(message = "Test {Self:!}")] | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unmatched `}` found - --> $DIR/broken_format.rs:1:32 + --> $DIR/broken_format.rs:2:32 | LL | #[diagnostic::on_unimplemented(message = "{{Test } thing")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -51,7 +51,7 @@ LL | #[diagnostic::on_unimplemented(message = "{{Test } thing")] = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0277]: {{Test } thing - --> $DIR/broken_format.rs:35:13 + --> $DIR/broken_format.rs:36:13 | LL | check_1(()); | ------- ^^ the trait `ImportantTrait1` is not implemented for `()` @@ -59,18 +59,18 @@ LL | check_1(()); | required by a bound introduced by this call | help: this trait has no implementations, consider adding one - --> $DIR/broken_format.rs:4:1 + --> $DIR/broken_format.rs:5:1 | LL | trait ImportantTrait1 {} | ^^^^^^^^^^^^^^^^^^^^^ note: required by a bound in `check_1` - --> $DIR/broken_format.rs:28:20 + --> $DIR/broken_format.rs:29:20 | LL | fn check_1(_: impl ImportantTrait1) {} | ^^^^^^^^^^^^^^^ required by this bound in `check_1` warning: positional format arguments are not allowed here - --> $DIR/broken_format.rs:6:32 + --> $DIR/broken_format.rs:7:32 | LL | #[diagnostic::on_unimplemented(message = "Test {}")] | ^^^^^^^^^^^^^^^^^^^ @@ -79,7 +79,7 @@ LL | #[diagnostic::on_unimplemented(message = "Test {}")] = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0277]: Test {} - --> $DIR/broken_format.rs:37:13 + --> $DIR/broken_format.rs:38:13 | LL | check_2(()); | ------- ^^ the trait `ImportantTrait2` is not implemented for `()` @@ -87,18 +87,18 @@ LL | check_2(()); | required by a bound introduced by this call | help: this trait has no implementations, consider adding one - --> $DIR/broken_format.rs:9:1 + --> $DIR/broken_format.rs:10:1 | LL | trait ImportantTrait2 {} | ^^^^^^^^^^^^^^^^^^^^^ note: required by a bound in `check_2` - --> $DIR/broken_format.rs:29:20 + --> $DIR/broken_format.rs:30:20 | LL | fn check_2(_: impl ImportantTrait2) {} | ^^^^^^^^^^^^^^^ required by this bound in `check_2` warning: positional format arguments are not allowed here - --> $DIR/broken_format.rs:11:32 + --> $DIR/broken_format.rs:12:32 | LL | #[diagnostic::on_unimplemented(message = "Test {1:}")] | ^^^^^^^^^^^^^^^^^^^^^ @@ -107,7 +107,7 @@ LL | #[diagnostic::on_unimplemented(message = "Test {1:}")] = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0277]: Test {1} - --> $DIR/broken_format.rs:39:13 + --> $DIR/broken_format.rs:40:13 | LL | check_3(()); | ------- ^^ the trait `ImportantTrait3` is not implemented for `()` @@ -115,18 +115,18 @@ LL | check_3(()); | required by a bound introduced by this call | help: this trait has no implementations, consider adding one - --> $DIR/broken_format.rs:14:1 + --> $DIR/broken_format.rs:15:1 | LL | trait ImportantTrait3 {} | ^^^^^^^^^^^^^^^^^^^^^ note: required by a bound in `check_3` - --> $DIR/broken_format.rs:30:20 + --> $DIR/broken_format.rs:31:20 | LL | fn check_3(_: impl ImportantTrait3) {} | ^^^^^^^^^^^^^^^ required by this bound in `check_3` warning: invalid format specifier - --> $DIR/broken_format.rs:16:32 + --> $DIR/broken_format.rs:17:32 | LL | #[diagnostic::on_unimplemented(message = "Test {Self:123}")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -135,7 +135,7 @@ LL | #[diagnostic::on_unimplemented(message = "Test {Self:123}")] = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0277]: Test () - --> $DIR/broken_format.rs:41:13 + --> $DIR/broken_format.rs:42:13 | LL | check_4(()); | ------- ^^ the trait `ImportantTrait4` is not implemented for `()` @@ -143,18 +143,18 @@ LL | check_4(()); | required by a bound introduced by this call | help: this trait has no implementations, consider adding one - --> $DIR/broken_format.rs:19:1 + --> $DIR/broken_format.rs:20:1 | LL | trait ImportantTrait4 {} | ^^^^^^^^^^^^^^^^^^^^^ note: required by a bound in `check_4` - --> $DIR/broken_format.rs:31:20 + --> $DIR/broken_format.rs:32:20 | LL | fn check_4(_: impl ImportantTrait4) {} | ^^^^^^^^^^^^^^^ required by this bound in `check_4` warning: expected `}`, found `!` - --> $DIR/broken_format.rs:21:32 + --> $DIR/broken_format.rs:22:32 | LL | #[diagnostic::on_unimplemented(message = "Test {Self:!}")] | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -162,7 +162,7 @@ LL | #[diagnostic::on_unimplemented(message = "Test {Self:!}")] = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` warning: unmatched `}` found - --> $DIR/broken_format.rs:21:32 + --> $DIR/broken_format.rs:22:32 | LL | #[diagnostic::on_unimplemented(message = "Test {Self:!}")] | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -170,7 +170,7 @@ LL | #[diagnostic::on_unimplemented(message = "Test {Self:!}")] = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0277]: Test {Self:!} - --> $DIR/broken_format.rs:43:13 + --> $DIR/broken_format.rs:44:13 | LL | check_5(()); | ------- ^^ the trait `ImportantTrait5` is not implemented for `()` @@ -178,12 +178,12 @@ LL | check_5(()); | required by a bound introduced by this call | help: this trait has no implementations, consider adding one - --> $DIR/broken_format.rs:26:1 + --> $DIR/broken_format.rs:27:1 | LL | trait ImportantTrait5 {} | ^^^^^^^^^^^^^^^^^^^^^ note: required by a bound in `check_5` - --> $DIR/broken_format.rs:32:20 + --> $DIR/broken_format.rs:33:20 | LL | fn check_5(_: impl ImportantTrait5) {} | ^^^^^^^^^^^^^^^ required by this bound in `check_5` diff --git a/tests/ui/traits/custom-on-unimplemented-diagnostic.rs b/tests/ui/diagnostic_namespace/on_unimplemented/custom-on-unimplemented-diagnostic.rs index d7e257ef3bb..1173c939038 100644 --- a/tests/ui/traits/custom-on-unimplemented-diagnostic.rs +++ b/tests/ui/diagnostic_namespace/on_unimplemented/custom-on-unimplemented-diagnostic.rs @@ -1,3 +1,5 @@ +//@ reference: attributes.diagnostic.on_unimplemented.intro +//@ reference: attributes.diagnostic.on_unimplemented.keys #[diagnostic::on_unimplemented(message = "my message", label = "my label", note = "my note")] pub trait ProviderLt {} diff --git a/tests/ui/traits/custom-on-unimplemented-diagnostic.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/custom-on-unimplemented-diagnostic.stderr index f9788360d06..4c1838620b3 100644 --- a/tests/ui/traits/custom-on-unimplemented-diagnostic.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/custom-on-unimplemented-diagnostic.stderr @@ -1,5 +1,5 @@ error[E0599]: my message - --> $DIR/custom-on-unimplemented-diagnostic.rs:15:7 + --> $DIR/custom-on-unimplemented-diagnostic.rs:17:7 | LL | struct B; | -------- method `request` not found for this struct because it doesn't satisfy `B: ProviderExt` or `B: ProviderLt` @@ -8,7 +8,7 @@ LL | B.request(); | ^^^^^^^ my label | note: trait bound `B: ProviderLt` was not satisfied - --> $DIR/custom-on-unimplemented-diagnostic.rs:10:18 + --> $DIR/custom-on-unimplemented-diagnostic.rs:12:18 | LL | impl<T: ?Sized + ProviderLt> ProviderExt for T {} | ^^^^^^^^^^ ----------- - @@ -16,13 +16,13 @@ LL | impl<T: ?Sized + ProviderLt> ProviderExt for T {} | unsatisfied trait bound introduced here = note: my note note: the trait `ProviderLt` must be implemented - --> $DIR/custom-on-unimplemented-diagnostic.rs:2:1 + --> $DIR/custom-on-unimplemented-diagnostic.rs:4:1 | LL | pub trait ProviderLt {} | ^^^^^^^^^^^^^^^^^^^^ = help: items from traits can only be used if the trait is implemented and in scope note: `ProviderExt` defines an item `request`, perhaps you need to implement it - --> $DIR/custom-on-unimplemented-diagnostic.rs:4:1 + --> $DIR/custom-on-unimplemented-diagnostic.rs:6:1 | LL | pub trait ProviderExt { | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.rs b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.rs index 30a85ff2199..b76b550fcb2 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.rs +++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.rs @@ -1,3 +1,7 @@ +//@ reference: attributes.diagnostic.on_unimplemented.format-parameters +//@ reference: attributes.diagnostic.on_unimplemented.keys +//@ reference: attributes.diagnostic.on_unimplemented.syntax +//@ reference: attributes.diagnostic.on_unimplemented.invalid-formats #[diagnostic::on_unimplemented( on(_Self = "&str"), //~^WARN malformed `on_unimplemented` attribute diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr index e34b917f67e..bb455d92940 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr @@ -1,5 +1,5 @@ warning: `#[diagnostic::on_unimplemented]` can only be applied to trait definitions - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:22:1 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:26:1 | LL | #[diagnostic::on_unimplemented(message = "Not allowed to apply it on a impl")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | #[diagnostic::on_unimplemented(message = "Not allowed to apply it on a impl = note: `#[warn(unknown_or_malformed_diagnostic_attributes)]` on by default warning: malformed `on_unimplemented` attribute - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:2:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:6:5 | LL | on(_Self = "&str"), | ^^^^^^^^^^^^^^^^^^ invalid option found here @@ -15,7 +15,7 @@ LL | on(_Self = "&str"), = help: only `message`, `note` and `label` are allowed as options warning: malformed `on_unimplemented` attribute - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:8:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:12:5 | LL | parent_label = "in this scope", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here @@ -23,7 +23,7 @@ LL | parent_label = "in this scope", = help: only `message`, `note` and `label` are allowed as options warning: malformed `on_unimplemented` attribute - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:11:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:15:5 | LL | append_const_msg | ^^^^^^^^^^^^^^^^ invalid option found here @@ -31,7 +31,7 @@ LL | append_const_msg = help: only `message`, `note` and `label` are allowed as options warning: malformed `on_unimplemented` attribute - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:17:32 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:21:32 | LL | #[diagnostic::on_unimplemented = "Message"] | ^^^^^^^^^^^ invalid option found here @@ -39,7 +39,7 @@ LL | #[diagnostic::on_unimplemented = "Message"] = help: only `message`, `note` and `label` are allowed as options warning: there is no parameter `from_desugaring` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:29:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:33:5 | LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -47,7 +47,7 @@ LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", = help: expect either a generic argument name or `{Self}` as format argument warning: there is no parameter `direct` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:29:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:33:5 | LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -55,7 +55,7 @@ LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", = help: expect either a generic argument name or `{Self}` as format argument warning: there is no parameter `cause` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:29:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:33:5 | LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -63,7 +63,7 @@ LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", = help: expect either a generic argument name or `{Self}` as format argument warning: there is no parameter `integral` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:29:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:33:5 | LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -71,7 +71,7 @@ LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", = help: expect either a generic argument name or `{Self}` as format argument warning: there is no parameter `integer` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:29:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:33:5 | LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -79,7 +79,7 @@ LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", = help: expect either a generic argument name or `{Self}` as format argument warning: there is no parameter `float` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:40:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:5 | LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -87,7 +87,7 @@ LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" = help: expect either a generic argument name or `{Self}` as format argument warning: there is no parameter `_Self` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:40:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:5 | LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -95,7 +95,7 @@ LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" = help: expect either a generic argument name or `{Self}` as format argument warning: there is no parameter `crate_local` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:40:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:5 | LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -103,7 +103,7 @@ LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" = help: expect either a generic argument name or `{Self}` as format argument warning: there is no parameter `Trait` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:40:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:5 | LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -111,7 +111,7 @@ LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" = help: expect either a generic argument name or `{Self}` as format argument warning: there is no parameter `ItemContext` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:40:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:5 | LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -119,7 +119,7 @@ LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" = help: expect either a generic argument name or `{Self}` as format argument warning: malformed `on_unimplemented` attribute - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:2:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:6:5 | LL | on(_Self = "&str"), | ^^^^^^^^^^^^^^^^^^ invalid option found here @@ -128,7 +128,7 @@ LL | on(_Self = "&str"), = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` warning: malformed `on_unimplemented` attribute - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:8:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:12:5 | LL | parent_label = "in this scope", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here @@ -137,7 +137,7 @@ LL | parent_label = "in this scope", = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` warning: malformed `on_unimplemented` attribute - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:11:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:15:5 | LL | append_const_msg | ^^^^^^^^^^^^^^^^ invalid option found here @@ -146,7 +146,7 @@ LL | append_const_msg = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0277]: trait has `()` and `i32` as params - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:59:15 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:63:15 | LL | takes_foo(()); | --------- ^^ trait has `()` and `i32` as params @@ -156,18 +156,18 @@ LL | takes_foo(()); = help: the trait `Foo<i32>` is not implemented for `()` = note: trait has `()` and `i32` as params help: this trait has no implementations, consider adding one - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:15:1 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:19:1 | LL | trait Foo<T> {} | ^^^^^^^^^^^^ note: required by a bound in `takes_foo` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:54:22 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:58:22 | LL | fn takes_foo(_: impl Foo<i32>) {} | ^^^^^^^^ required by this bound in `takes_foo` warning: malformed `on_unimplemented` attribute - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:17:32 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:21:32 | LL | #[diagnostic::on_unimplemented = "Message"] | ^^^^^^^^^^^ invalid option found here @@ -176,7 +176,7 @@ LL | #[diagnostic::on_unimplemented = "Message"] = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0277]: the trait bound `(): Bar` is not satisfied - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:61:15 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:65:15 | LL | takes_bar(()); | --------- ^^ the trait `Bar` is not implemented for `()` @@ -185,13 +185,13 @@ LL | takes_bar(()); | = help: the trait `Bar` is implemented for `i32` note: required by a bound in `takes_bar` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:55:22 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:59:22 | LL | fn takes_bar(_: impl Bar) {} | ^^^ required by this bound in `takes_bar` warning: there is no parameter `from_desugaring` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:29:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:33:5 | LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -200,7 +200,7 @@ LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` warning: there is no parameter `direct` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:29:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:33:5 | LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -209,7 +209,7 @@ LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` warning: there is no parameter `cause` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:29:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:33:5 | LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -218,7 +218,7 @@ LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` warning: there is no parameter `integral` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:29:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:33:5 | LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -227,7 +227,7 @@ LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` warning: there is no parameter `integer` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:29:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:33:5 | LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -236,7 +236,7 @@ LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` warning: there is no parameter `float` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:40:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:5 | LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -245,7 +245,7 @@ LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` warning: there is no parameter `_Self` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:40:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:5 | LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -254,7 +254,7 @@ LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` warning: there is no parameter `crate_local` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:40:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:5 | LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -263,7 +263,7 @@ LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` warning: there is no parameter `Trait` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:40:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:5 | LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -272,7 +272,7 @@ LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` warning: there is no parameter `ItemContext` on trait `Baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:40:5 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:5 | LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -281,7 +281,7 @@ LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}" = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0277]: {from_desugaring}{direct}{cause}{integral}{integer} - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:63:15 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:67:15 | LL | takes_baz(()); | --------- ^^ {float}{_Self}{crate_local}{Trait}{ItemContext} @@ -290,12 +290,12 @@ LL | takes_baz(()); | = help: the trait `Baz` is not implemented for `()` help: this trait has no implementations, consider adding one - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:52:1 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:56:1 | LL | trait Baz {} | ^^^^^^^^^ note: required by a bound in `takes_baz` - --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:56:22 + --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:60:22 | LL | fn takes_baz(_: impl Baz) {} | ^^^ required by this bound in `takes_baz` diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs index b4234066bb1..8328c10d2a0 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs +++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs @@ -1,3 +1,5 @@ +//@ reference: attributes.diagnostic.on_unimplemented.syntax +//@ reference: attributes.diagnostic.on_unimplemented.unknown-keys #[diagnostic::on_unimplemented(unsupported = "foo")] //~^WARN malformed `on_unimplemented` attribute //~|WARN malformed `on_unimplemented` attribute diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr index dc0c1948236..11263580b15 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr @@ -1,5 +1,5 @@ warning: `#[diagnostic::on_unimplemented]` can only be applied to trait definitions - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:6:1 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:8:1 | LL | #[diagnostic::on_unimplemented(message = "Baz")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | #[diagnostic::on_unimplemented(message = "Baz")] = note: `#[warn(unknown_or_malformed_diagnostic_attributes)]` on by default warning: malformed `on_unimplemented` attribute - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:1:32 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:3:32 | LL | #[diagnostic::on_unimplemented(unsupported = "foo")] | ^^^^^^^^^^^^^^^^^^^ invalid option found here @@ -15,7 +15,7 @@ LL | #[diagnostic::on_unimplemented(unsupported = "foo")] = help: only `message`, `note` and `label` are allowed as options warning: malformed `on_unimplemented` attribute - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:10:50 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:12:50 | LL | #[diagnostic::on_unimplemented(message = "Boom", unsupported = "Bar")] | ^^^^^^^^^^^^^^^^^^^ invalid option found here @@ -23,7 +23,7 @@ LL | #[diagnostic::on_unimplemented(message = "Boom", unsupported = "Bar")] = help: only `message`, `note` and `label` are allowed as options warning: malformed `on_unimplemented` attribute - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:15:50 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:17:50 | LL | #[diagnostic::on_unimplemented(message = "Boom", on(_Self = "i32", message = "whatever"))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here @@ -31,7 +31,7 @@ LL | #[diagnostic::on_unimplemented(message = "Boom", on(_Self = "i32", message = help: only `message`, `note` and `label` are allowed as options warning: malformed `on_unimplemented` attribute - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:20:32 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:22:32 | LL | #[diagnostic::on_unimplemented = "boom"] | ^^^^^^^^ invalid option found here @@ -39,7 +39,7 @@ LL | #[diagnostic::on_unimplemented = "boom"] = help: only `message`, `note` and `label` are allowed as options warning: missing options for `on_unimplemented` attribute - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:24:1 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:26:1 | LL | #[diagnostic::on_unimplemented] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -47,7 +47,7 @@ LL | #[diagnostic::on_unimplemented] = help: at least one of the `message`, `note` and `label` options are expected warning: there is no parameter `DoesNotExist` on trait `Test` - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:29:32 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:31:32 | LL | #[diagnostic::on_unimplemented(message = "{DoesNotExist}")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -55,7 +55,7 @@ LL | #[diagnostic::on_unimplemented(message = "{DoesNotExist}")] = help: expect either a generic argument name or `{Self}` as format argument warning: malformed `on_unimplemented` attribute - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:1:32 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:3:32 | LL | #[diagnostic::on_unimplemented(unsupported = "foo")] | ^^^^^^^^^^^^^^^^^^^ invalid option found here @@ -64,7 +64,7 @@ LL | #[diagnostic::on_unimplemented(unsupported = "foo")] = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0277]: the trait bound `i32: Foo` is not satisfied - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:41:14 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:43:14 | LL | take_foo(1_i32); | -------- ^^^^^ the trait `Foo` is not implemented for `i32` @@ -72,18 +72,18 @@ LL | take_foo(1_i32); | required by a bound introduced by this call | help: this trait has no implementations, consider adding one - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:4:1 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:6:1 | LL | trait Foo {} | ^^^^^^^^^ note: required by a bound in `take_foo` - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:34:21 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:36:21 | LL | fn take_foo(_: impl Foo) {} | ^^^ required by this bound in `take_foo` warning: malformed `on_unimplemented` attribute - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:10:50 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:12:50 | LL | #[diagnostic::on_unimplemented(message = "Boom", unsupported = "Bar")] | ^^^^^^^^^^^^^^^^^^^ invalid option found here @@ -92,7 +92,7 @@ LL | #[diagnostic::on_unimplemented(message = "Boom", unsupported = "Bar")] = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0277]: Boom - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:43:14 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:45:14 | LL | take_baz(1_i32); | -------- ^^^^^ the trait `Baz` is not implemented for `i32` @@ -100,18 +100,18 @@ LL | take_baz(1_i32); | required by a bound introduced by this call | help: this trait has no implementations, consider adding one - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:13:1 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:15:1 | LL | trait Baz {} | ^^^^^^^^^ note: required by a bound in `take_baz` - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:35:21 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:37:21 | LL | fn take_baz(_: impl Baz) {} | ^^^ required by this bound in `take_baz` warning: malformed `on_unimplemented` attribute - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:15:50 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:17:50 | LL | #[diagnostic::on_unimplemented(message = "Boom", on(_Self = "i32", message = "whatever"))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here @@ -120,7 +120,7 @@ LL | #[diagnostic::on_unimplemented(message = "Boom", on(_Self = "i32", message = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0277]: Boom - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:45:15 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:47:15 | LL | take_boom(1_i32); | --------- ^^^^^ the trait `Boom` is not implemented for `i32` @@ -128,18 +128,18 @@ LL | take_boom(1_i32); | required by a bound introduced by this call | help: this trait has no implementations, consider adding one - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:18:1 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:20:1 | LL | trait Boom {} | ^^^^^^^^^^ note: required by a bound in `take_boom` - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:36:22 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:38:22 | LL | fn take_boom(_: impl Boom) {} | ^^^^ required by this bound in `take_boom` warning: missing options for `on_unimplemented` attribute - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:24:1 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:26:1 | LL | #[diagnostic::on_unimplemented] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -148,7 +148,7 @@ LL | #[diagnostic::on_unimplemented] = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0277]: the trait bound `i32: Whatever` is not satisfied - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:47:19 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:49:19 | LL | take_whatever(1_i32); | ------------- ^^^^^ the trait `Whatever` is not implemented for `i32` @@ -156,18 +156,18 @@ LL | take_whatever(1_i32); | required by a bound introduced by this call | help: this trait has no implementations, consider adding one - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:27:1 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:29:1 | LL | trait Whatever {} | ^^^^^^^^^^^^^^ note: required by a bound in `take_whatever` - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:37:26 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:39:26 | LL | fn take_whatever(_: impl Whatever) {} | ^^^^^^^^ required by this bound in `take_whatever` warning: there is no parameter `DoesNotExist` on trait `Test` - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:29:32 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:31:32 | LL | #[diagnostic::on_unimplemented(message = "{DoesNotExist}")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -176,7 +176,7 @@ LL | #[diagnostic::on_unimplemented(message = "{DoesNotExist}")] = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0277]: {DoesNotExist} - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:49:15 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:51:15 | LL | take_test(()); | --------- ^^ the trait `Test` is not implemented for `()` @@ -184,12 +184,12 @@ LL | take_test(()); | required by a bound introduced by this call | help: this trait has no implementations, consider adding one - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:32:1 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:34:1 | LL | trait Test {} | ^^^^^^^^^^ note: required by a bound in `take_test` - --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:38:22 + --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:40:22 | LL | fn take_test(_: impl Test) {} | ^^^^ required by this bound in `take_test` diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.rs b/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.rs index 7eaff73dca1..dff209d4761 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.rs +++ b/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.rs @@ -1,4 +1,5 @@ //@ aux-build:other.rs +//@ reference: attributes.diagnostic.on_unimplemented.intro extern crate other; diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.stderr index a9968538d0d..c0dd6d9628a 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.stderr @@ -1,5 +1,5 @@ error[E0277]: Message - --> $DIR/error_is_shown_in_downstream_crates.rs:10:14 + --> $DIR/error_is_shown_in_downstream_crates.rs:11:14 | LL | take_foo(()); | -------- ^^ label @@ -9,7 +9,7 @@ LL | take_foo(()); = help: the trait `Foo` is not implemented for `()` = note: Note note: required by a bound in `take_foo` - --> $DIR/error_is_shown_in_downstream_crates.rs:7:21 + --> $DIR/error_is_shown_in_downstream_crates.rs:8:21 | LL | fn take_foo(_: impl Foo) {} | ^^^ required by this bound in `take_foo` diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.rs b/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.rs index 5b25fb234bc..c638681173d 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.rs +++ b/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.rs @@ -1,3 +1,5 @@ +//@ reference: attributes.diagnostic.on_unimplemented.repetition +//@ reference: attributes.diagnostic.on_unimplemented.syntax #[diagnostic::on_unimplemented( if(Self = "()"), //~^WARN malformed `on_unimplemented` attribute diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr index 56d125e20e5..e00846da77b 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr @@ -1,5 +1,5 @@ warning: malformed `on_unimplemented` attribute - --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:2:5 + --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:4:5 | LL | if(Self = "()"), | ^^^^^^^^^^^^^^^ invalid option found here @@ -8,7 +8,7 @@ LL | if(Self = "()"), = note: `#[warn(unknown_or_malformed_diagnostic_attributes)]` on by default warning: `message` is ignored due to previous definition of `message` - --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:8:32 + --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:10:32 | LL | message = "custom message", | -------------------------- `message` is first declared here @@ -17,7 +17,7 @@ LL | #[diagnostic::on_unimplemented(message = "fallback!!")] | ^^^^^^^^^^^^^^^^^^^^^^ `message` is already declared here warning: malformed `on_unimplemented` attribute - --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:2:5 + --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:4:5 | LL | if(Self = "()"), | ^^^^^^^^^^^^^^^ invalid option found here @@ -26,7 +26,7 @@ LL | if(Self = "()"), = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` warning: `message` is ignored due to previous definition of `message` - --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:8:32 + --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:10:32 | LL | message = "custom message", | -------------------------- `message` is first declared here @@ -37,7 +37,7 @@ LL | #[diagnostic::on_unimplemented(message = "fallback!!")] = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0277]: custom message - --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:18:15 + --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:20:15 | LL | takes_foo(()); | --------- ^^ fallback label @@ -48,12 +48,12 @@ LL | takes_foo(()); = note: custom note = note: fallback note help: this trait has no implementations, consider adding one - --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:13:1 + --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:15:1 | LL | trait Foo {} | ^^^^^^^^^ note: required by a bound in `takes_foo` - --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:15:22 + --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:17:22 | LL | fn takes_foo(_: impl Foo) {} | ^^^ required by this bound in `takes_foo` diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/multiple_notes.rs b/tests/ui/diagnostic_namespace/on_unimplemented/multiple_notes.rs index a5982f6492c..dc0f850031e 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/multiple_notes.rs +++ b/tests/ui/diagnostic_namespace/on_unimplemented/multiple_notes.rs @@ -1,3 +1,4 @@ +//@ reference: attributes.diagnostic.on_unimplemented.note-repetition #[diagnostic::on_unimplemented(message = "Foo", label = "Bar", note = "Baz", note = "Boom")] trait Foo {} diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/multiple_notes.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/multiple_notes.stderr index 93a0d0b3f41..6567269be3b 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/multiple_notes.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/multiple_notes.stderr @@ -1,5 +1,5 @@ error[E0277]: Foo - --> $DIR/multiple_notes.rs:12:15 + --> $DIR/multiple_notes.rs:13:15 | LL | takes_foo(()); | --------- ^^ Bar @@ -10,18 +10,18 @@ LL | takes_foo(()); = note: Baz = note: Boom help: this trait has no implementations, consider adding one - --> $DIR/multiple_notes.rs:2:1 + --> $DIR/multiple_notes.rs:3:1 | LL | trait Foo {} | ^^^^^^^^^ note: required by a bound in `takes_foo` - --> $DIR/multiple_notes.rs:8:22 + --> $DIR/multiple_notes.rs:9:22 | LL | fn takes_foo(_: impl Foo) {} | ^^^ required by this bound in `takes_foo` error[E0277]: Bar - --> $DIR/multiple_notes.rs:14:15 + --> $DIR/multiple_notes.rs:15:15 | LL | takes_bar(()); | --------- ^^ Foo @@ -32,12 +32,12 @@ LL | takes_bar(()); = note: Baz = note: Baz2 help: this trait has no implementations, consider adding one - --> $DIR/multiple_notes.rs:6:1 + --> $DIR/multiple_notes.rs:7:1 | LL | trait Bar {} | ^^^^^^^^^ note: required by a bound in `takes_bar` - --> $DIR/multiple_notes.rs:9:22 + --> $DIR/multiple_notes.rs:10:22 | LL | fn takes_bar(_: impl Bar) {} | ^^^ required by this bound in `takes_bar` diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/on_unimplemented_simple.rs b/tests/ui/diagnostic_namespace/on_unimplemented/on_unimplemented_simple.rs index 7ca03127759..e584077c643 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/on_unimplemented_simple.rs +++ b/tests/ui/diagnostic_namespace/on_unimplemented/on_unimplemented_simple.rs @@ -1,3 +1,5 @@ +//@ reference: attributes.diagnostic.on_unimplemented.intro +//@ reference: attributes.diagnostic.on_unimplemented.keys #[diagnostic::on_unimplemented(message = "Foo", label = "Bar", note = "Baz")] trait Foo {} diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/on_unimplemented_simple.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/on_unimplemented_simple.stderr index 6b17f40c6dd..de57f7044bf 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/on_unimplemented_simple.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/on_unimplemented_simple.stderr @@ -1,5 +1,5 @@ error[E0277]: Foo - --> $DIR/on_unimplemented_simple.rs:7:15 + --> $DIR/on_unimplemented_simple.rs:9:15 | LL | takes_foo(()); | --------- ^^ Bar @@ -9,12 +9,12 @@ LL | takes_foo(()); = help: the trait `Foo` is not implemented for `()` = note: Baz help: this trait has no implementations, consider adding one - --> $DIR/on_unimplemented_simple.rs:2:1 + --> $DIR/on_unimplemented_simple.rs:4:1 | LL | trait Foo {} | ^^^^^^^^^ note: required by a bound in `takes_foo` - --> $DIR/on_unimplemented_simple.rs:4:22 + --> $DIR/on_unimplemented_simple.rs:6:22 | LL | fn takes_foo(_: impl Foo) {} | ^^^ required by this bound in `takes_foo` diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.rs b/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.rs index 8c0b8150417..d0eb608c40f 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.rs +++ b/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.rs @@ -1,3 +1,4 @@ +//@ reference: attributes.diagnostic.on_unimplemented.repetition #[diagnostic::on_unimplemented( message = "first message", label = "first label", diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.stderr index 43ab6bf25a1..feafe2cee76 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.stderr @@ -1,5 +1,5 @@ warning: `message` is ignored due to previous definition of `message` - --> $DIR/report_warning_on_duplicated_options.rs:7:5 + --> $DIR/report_warning_on_duplicated_options.rs:8:5 | LL | message = "first message", | ------------------------- `message` is first declared here @@ -10,7 +10,7 @@ LL | message = "second message", = note: `#[warn(unknown_or_malformed_diagnostic_attributes)]` on by default warning: `label` is ignored due to previous definition of `label` - --> $DIR/report_warning_on_duplicated_options.rs:10:5 + --> $DIR/report_warning_on_duplicated_options.rs:11:5 | LL | label = "first label", | --------------------- `label` is first declared here @@ -19,7 +19,7 @@ LL | label = "second label", | ^^^^^^^^^^^^^^^^^^^^^^ `label` is already declared here warning: `message` is ignored due to previous definition of `message` - --> $DIR/report_warning_on_duplicated_options.rs:7:5 + --> $DIR/report_warning_on_duplicated_options.rs:8:5 | LL | message = "first message", | ------------------------- `message` is first declared here @@ -30,7 +30,7 @@ LL | message = "second message", = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` warning: `label` is ignored due to previous definition of `label` - --> $DIR/report_warning_on_duplicated_options.rs:10:5 + --> $DIR/report_warning_on_duplicated_options.rs:11:5 | LL | label = "first label", | --------------------- `label` is first declared here @@ -41,7 +41,7 @@ LL | label = "second label", = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0277]: first message - --> $DIR/report_warning_on_duplicated_options.rs:21:15 + --> $DIR/report_warning_on_duplicated_options.rs:22:15 | LL | takes_foo(()); | --------- ^^ first label @@ -52,12 +52,12 @@ LL | takes_foo(()); = note: custom note = note: second note help: this trait has no implementations, consider adding one - --> $DIR/report_warning_on_duplicated_options.rs:15:1 + --> $DIR/report_warning_on_duplicated_options.rs:16:1 | LL | trait Foo {} | ^^^^^^^^^ note: required by a bound in `takes_foo` - --> $DIR/report_warning_on_duplicated_options.rs:18:22 + --> $DIR/report_warning_on_duplicated_options.rs:19:22 | LL | fn takes_foo(_: impl Foo) {} | ^^^ required by this bound in `takes_foo` diff --git a/tests/ui/diagnostic_namespace/suggest_typos.rs b/tests/ui/diagnostic_namespace/suggest_typos.rs index b25f097a8ad..6fa4f800462 100644 --- a/tests/ui/diagnostic_namespace/suggest_typos.rs +++ b/tests/ui/diagnostic_namespace/suggest_typos.rs @@ -1,3 +1,4 @@ +//@ reference: attributes.diagnostic.namespace.unknown-invalid-syntax #![deny(unknown_or_malformed_diagnostic_attributes)] #[diagnostic::onunimplemented] diff --git a/tests/ui/diagnostic_namespace/suggest_typos.stderr b/tests/ui/diagnostic_namespace/suggest_typos.stderr index 307311258f2..ff4ee9717d4 100644 --- a/tests/ui/diagnostic_namespace/suggest_typos.stderr +++ b/tests/ui/diagnostic_namespace/suggest_typos.stderr @@ -1,11 +1,11 @@ error: unknown diagnostic attribute - --> $DIR/suggest_typos.rs:3:15 + --> $DIR/suggest_typos.rs:4:15 | LL | #[diagnostic::onunimplemented] | ^^^^^^^^^^^^^^^ | note: the lint level is defined here - --> $DIR/suggest_typos.rs:1:9 + --> $DIR/suggest_typos.rs:2:9 | LL | #![deny(unknown_or_malformed_diagnostic_attributes)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -15,7 +15,7 @@ LL | #[diagnostic::on_unimplemented] | ~~~~~~~~~~~~~~~~ error: unknown diagnostic attribute - --> $DIR/suggest_typos.rs:8:15 + --> $DIR/suggest_typos.rs:9:15 | LL | #[diagnostic::un_onimplemented] | ^^^^^^^^^^^^^^^^ @@ -26,7 +26,7 @@ LL | #[diagnostic::on_unimplemented] | ~~~~~~~~~~~~~~~~ error: unknown diagnostic attribute - --> $DIR/suggest_typos.rs:13:15 + --> $DIR/suggest_typos.rs:14:15 | LL | #[diagnostic::on_implemented] | ^^^^^^^^^^^^^^ diff --git a/tests/ui/drop/lint-tail-expr-drop-order-gated.rs b/tests/ui/drop/lint-tail-expr-drop-order-gated.rs index fde542c756f..508e7bdbf99 100644 --- a/tests/ui/drop/lint-tail-expr-drop-order-gated.rs +++ b/tests/ui/drop/lint-tail-expr-drop-order-gated.rs @@ -1,9 +1,10 @@ -// This test is to demonstrate that the lint is gated behind Edition and -// is triggered only for Edition 2021 and before. +// This test ensures that `tail_expr_drop_order` does not activate in case Edition 2024 is used +// because this is a migration lint. +// Only `cargo fix --edition 2024` shall activate this lint. //@ check-pass -//@ edition: 2024 //@ compile-flags: -Z unstable-options +//@ edition: 2024 #![deny(tail_expr_drop_order)] diff --git a/tests/ui/drop/lint-tail-expr-drop-order.rs b/tests/ui/drop/lint-tail-expr-drop-order.rs index d61abae5187..0fabc1f085c 100644 --- a/tests/ui/drop/lint-tail-expr-drop-order.rs +++ b/tests/ui/drop/lint-tail-expr-drop-order.rs @@ -1,13 +1,26 @@ -//@ edition: 2021 - // Edition 2024 lint for change in drop order at tail expression // This lint is to capture potential change in program semantics // due to implementation of RFC 3606 <https://github.com/rust-lang/rfcs/pull/3606> +//@ edition: 2021 +//@ build-fail -#![deny(tail_expr_drop_order)] +#![deny(tail_expr_drop_order)] //~ NOTE: the lint level is defined here +#![allow(dropping_copy_types)] struct LoudDropper; impl Drop for LoudDropper { + //~^ NOTE: `#1` invokes this custom destructor + //~| NOTE: `x` invokes this custom destructor + //~| NOTE: `#1` invokes this custom destructor + //~| NOTE: `x` invokes this custom destructor + //~| NOTE: `#1` invokes this custom destructor + //~| NOTE: `x` invokes this custom destructor + //~| NOTE: `#1` invokes this custom destructor + //~| NOTE: `x` invokes this custom destructor + //~| NOTE: `#1` invokes this custom destructor + //~| NOTE: `future` invokes this custom destructor + //~| NOTE: `_x` invokes this custom destructor + //~| NOTE: `#1` invokes this custom destructor fn drop(&mut self) { // This destructor should be considered significant because it is a custom destructor // and we will assume that the destructor can generate side effects arbitrarily so that @@ -23,30 +36,70 @@ impl LoudDropper { fn should_lint() -> i32 { let x = LoudDropper; + //~^ NOTE: `x` calls a custom destructor + //~| NOTE: `x` will be dropped later as of Edition 2024 // Should lint x.get() + LoudDropper.get() - //~^ ERROR: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 + //~^ ERROR: relative drop order changing in Rust 2024 + //~| NOTE: this value will be stored in a temporary; let us call it `#1` + //~| NOTE: up until Edition 2021 `#1` is dropped last but will be dropped earlier in Edition 2024 //~| WARN: this changes meaning in Rust 2024 + //~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects + //~| NOTE: for more information, see issue #123739 } +//~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement -fn should_lint_closure() -> impl FnOnce() -> i32 { +fn should_not_lint_closure() -> impl FnOnce() -> i32 { let x = LoudDropper; - move || x.get() + LoudDropper.get() - //~^ ERROR: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 - //~| WARN: this changes meaning in Rust 2024 + move || { + // Should not lint because ... + x.get() + LoudDropper.get() + } + // ^ closure captures like `x` are always dropped last by contract +} + +fn should_lint_in_nested_items() { + fn should_lint_me() -> i32 { + let x = LoudDropper; + //~^ NOTE: `x` calls a custom destructor + //~| NOTE: `x` will be dropped later as of Edition 2024 + // Should lint + x.get() + LoudDropper.get() + //~^ ERROR: relative drop order changing in Rust 2024 + //~| NOTE: this value will be stored in a temporary; let us call it `#1` + //~| NOTE: up until Edition 2021 `#1` is dropped last but will be dropped earlier in Edition 2024 + //~| WARN: this changes meaning in Rust 2024 + //~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects + //~| NOTE: for more information, see issue #123739 + } + //~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement } +fn should_not_lint_params(x: LoudDropper) -> i32 { + // Should not lint because ... + x.get() + LoudDropper.get() +} +// ^ function parameters like `x` are always dropped last + fn should_not_lint() -> i32 { let x = LoudDropper; // Should not lint x.get() } -fn should_not_lint_in_nested_block() -> i32 { +fn should_lint_in_nested_block() -> i32 { let x = LoudDropper; - // Should not lint because Edition 2021 drops temporaries in blocks earlier already + //~^ NOTE: `x` calls a custom destructor + //~| NOTE: `x` will be dropped later as of Edition 2024 { LoudDropper.get() } + //~^ ERROR: relative drop order changing in Rust 2024 + //~| NOTE: this value will be stored in a temporary; let us call it `#1` + //~| NOTE: up until Edition 2021 `#1` is dropped last but will be dropped earlier in Edition 2024 + //~| WARN: this changes meaning in Rust 2024 + //~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects + //~| NOTE: for more information, see issue #123739 } +//~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement fn should_not_lint_in_match_arm() -> i32 { let x = LoudDropper; @@ -56,14 +109,144 @@ fn should_not_lint_in_match_arm() -> i32 { } } -fn should_lint_in_nested_items() { - fn should_lint_me() -> i32 { +fn should_not_lint_when_consumed() -> (LoudDropper, i32) { + let x = LoudDropper; + // Should not lint because `LoudDropper` is consumed by the return value + (LoudDropper, x.get()) +} + +struct MyAdt { + a: LoudDropper, + b: LoudDropper, +} + +fn should_not_lint_when_consumed_in_ctor() -> MyAdt { + let a = LoudDropper; + // Should not lint + MyAdt { a, b: LoudDropper } +} + +fn should_not_lint_when_moved() -> i32 { + let x = LoudDropper; + drop(x); + // Should not lint because `x` is not live + LoudDropper.get() +} + +fn should_lint_into_async_body() -> i32 { + async fn f() { + async fn f() {} let x = LoudDropper; - // Should lint - x.get() + LoudDropper.get() - //~^ ERROR: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 - //~| WARN: this changes meaning in Rust 2024 + f().await; + drop(x); + } + + let future = f(); + //~^ NOTE: `future` calls a custom destructor + //~| NOTE: `future` will be dropped later as of Edition 2024 + LoudDropper.get() + //~^ ERROR: relative drop order changing in Rust 2024 + //~| WARN: this changes meaning in Rust 2024 + //~| NOTE: this value will be stored in a temporary; let us call it `#1` + //~| NOTE: up until Edition 2021 `#1` is dropped last but will be dropped earlier in Edition 2024 + //~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects + //~| NOTE: for more information, see issue #123739 +} +//~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement + +fn should_lint_generics<T: Default>() -> &'static str { + fn extract<T>(_: &T) -> &'static str { + todo!() + } + let x = T::default(); + //~^ NOTE: `x` calls a custom destructor + //~| NOTE: `x` will be dropped later as of Edition 2024 + extract(&T::default()) + //~^ ERROR: relative drop order changing in Rust 2024 + //~| WARN: this changes meaning in Rust 2024 + //~| NOTE: this value will be stored in a temporary; let us call it `#1` + //~| NOTE: up until Edition 2021 `#1` is dropped last but will be dropped earlier in Edition 2024 + //~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects + //~| NOTE: for more information, see issue #123739 +} +//~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement + +fn should_lint_adt() -> i32 { + let x: Result<LoudDropper, ()> = Ok(LoudDropper); + //~^ NOTE: `x` calls a custom destructor + //~| NOTE: `x` will be dropped later as of Edition 2024 + LoudDropper.get() + //~^ ERROR: relative drop order changing in Rust 2024 + //~| WARN: this changes meaning in Rust 2024 + //~| NOTE: this value will be stored in a temporary; let us call it `#1` + //~| NOTE: up until Edition 2021 `#1` is dropped last but will be dropped earlier in Edition 2024 + //~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects + //~| NOTE: for more information, see issue #123739 +} +//~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement + +fn should_not_lint_insign_dtor() -> i32 { + let x = String::new(); + LoudDropper.get() +} + +fn should_lint_with_dtor_span() -> i32 { + struct LoudDropper3; + impl Drop for LoudDropper3 { + //~^ NOTE: `#1` invokes this custom destructor + fn drop(&mut self) { + println!("loud drop"); + } } + impl LoudDropper3 { + fn get(&self) -> i32 { + 0 + } + } + struct LoudDropper2; + impl Drop for LoudDropper2 { + //~^ NOTE: `x` invokes this custom destructor + fn drop(&mut self) { + println!("loud drop"); + } + } + impl LoudDropper2 { + fn get(&self) -> i32 { + 0 + } + } + + let x = LoudDropper2; + //~^ NOTE: `x` calls a custom destructor + //~| NOTE: `x` will be dropped later as of Edition 2024 + LoudDropper3.get() + //~^ ERROR: relative drop order changing in Rust 2024 + //~| NOTE: this value will be stored in a temporary; let us call it `#1` + //~| NOTE: up until Edition 2021 `#1` is dropped last but will be dropped earlier in Edition 2024 + //~| WARN: this changes meaning in Rust 2024 + //~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects + //~| NOTE: for more information, see issue #123739 +} +//~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement + +fn should_lint_with_transient_drops() { + drop(( + { + LoudDropper.get() + //~^ ERROR: relative drop order changing in Rust 2024 + //~| NOTE: this value will be stored in a temporary; let us call it `#1` + //~| NOTE: up until Edition 2021 `#1` is dropped last but will be dropped earlier in Edition 2024 + //~| WARN: this changes meaning in Rust 2024 + //~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects + //~| NOTE: for more information, see issue #123739 + }, + { + let _x = LoudDropper; + //~^ NOTE: `_x` calls a custom destructor + //~| NOTE: `_x` will be dropped later as of Edition 2024 + }, + )); + //~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement } fn main() {} diff --git a/tests/ui/drop/lint-tail-expr-drop-order.stderr b/tests/ui/drop/lint-tail-expr-drop-order.stderr index 6775c4ce6d1..f0da24605e6 100644 --- a/tests/ui/drop/lint-tail-expr-drop-order.stderr +++ b/tests/ui/drop/lint-tail-expr-drop-order.stderr @@ -1,42 +1,335 @@ -error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 - --> $DIR/lint-tail-expr-drop-order.rs:27:15 +error: relative drop order changing in Rust 2024 + --> $DIR/lint-tail-expr-drop-order.rs:42:15 | LL | let x = LoudDropper; - | - these values have significant drop implementation and will observe changes in drop order under Edition 2024 -LL | // Should lint + | - + | | + | `x` calls a custom destructor + | `x` will be dropped later as of Edition 2024 +... LL | x.get() + LoudDropper.get() | ^^^^^^^^^^^ + | | + | this value will be stored in a temporary; let us call it `#1` + | up until Edition 2021 `#1` is dropped last but will be dropped earlier in Edition 2024 +... +LL | } + | - now the temporary value is dropped here, before the local variables in the block or statement | = warning: this changes meaning in Rust 2024 = note: for more information, see issue #123739 <https://github.com/rust-lang/rust/issues/123739> +note: `#1` invokes this custom destructor + --> $DIR/lint-tail-expr-drop-order.rs:11:1 + | +LL | / impl Drop for LoudDropper { +LL | | +LL | | +LL | | +... | +LL | | } +LL | | } + | |_^ +note: `x` invokes this custom destructor + --> $DIR/lint-tail-expr-drop-order.rs:11:1 + | +LL | / impl Drop for LoudDropper { +LL | | +LL | | +LL | | +... | +LL | | } +LL | | } + | |_^ + = note: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects like releasing locks or sending messages note: the lint level is defined here --> $DIR/lint-tail-expr-drop-order.rs:7:9 | LL | #![deny(tail_expr_drop_order)] | ^^^^^^^^^^^^^^^^^^^^ -error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 - --> $DIR/lint-tail-expr-drop-order.rs:34:23 +error: relative drop order changing in Rust 2024 + --> $DIR/lint-tail-expr-drop-order.rs:67:19 + | +LL | let x = LoudDropper; + | - + | | + | `x` calls a custom destructor + | `x` will be dropped later as of Edition 2024 +... +LL | x.get() + LoudDropper.get() + | ^^^^^^^^^^^ + | | + | this value will be stored in a temporary; let us call it `#1` + | up until Edition 2021 `#1` is dropped last but will be dropped earlier in Edition 2024 +... +LL | } + | - now the temporary value is dropped here, before the local variables in the block or statement + | + = warning: this changes meaning in Rust 2024 + = note: for more information, see issue #123739 <https://github.com/rust-lang/rust/issues/123739> +note: `#1` invokes this custom destructor + --> $DIR/lint-tail-expr-drop-order.rs:11:1 + | +LL | / impl Drop for LoudDropper { +LL | | +LL | | +LL | | +... | +LL | | } +LL | | } + | |_^ +note: `x` invokes this custom destructor + --> $DIR/lint-tail-expr-drop-order.rs:11:1 + | +LL | / impl Drop for LoudDropper { +LL | | +LL | | +LL | | +... | +LL | | } +LL | | } + | |_^ + = note: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects like releasing locks or sending messages + +error: relative drop order changing in Rust 2024 + --> $DIR/lint-tail-expr-drop-order.rs:94:7 | LL | let x = LoudDropper; - | - these values have significant drop implementation and will observe changes in drop order under Edition 2024 -LL | move || x.get() + LoudDropper.get() - | ^^^^^^^^^^^ + | - + | | + | `x` calls a custom destructor + | `x` will be dropped later as of Edition 2024 +... +LL | { LoudDropper.get() } + | ^^^^^^^^^^^ + | | + | this value will be stored in a temporary; let us call it `#1` + | up until Edition 2021 `#1` is dropped last but will be dropped earlier in Edition 2024 +... +LL | } + | - now the temporary value is dropped here, before the local variables in the block or statement | = warning: this changes meaning in Rust 2024 = note: for more information, see issue #123739 <https://github.com/rust-lang/rust/issues/123739> +note: `#1` invokes this custom destructor + --> $DIR/lint-tail-expr-drop-order.rs:11:1 + | +LL | / impl Drop for LoudDropper { +LL | | +LL | | +LL | | +... | +LL | | } +LL | | } + | |_^ +note: `x` invokes this custom destructor + --> $DIR/lint-tail-expr-drop-order.rs:11:1 + | +LL | / impl Drop for LoudDropper { +LL | | +LL | | +LL | | +... | +LL | | } +LL | | } + | |_^ + = note: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects like releasing locks or sending messages -error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 - --> $DIR/lint-tail-expr-drop-order.rs:63:19 +error: relative drop order changing in Rust 2024 + --> $DIR/lint-tail-expr-drop-order.rs:147:5 | -LL | let x = LoudDropper; - | - these values have significant drop implementation and will observe changes in drop order under Edition 2024 -LL | // Should lint -LL | x.get() + LoudDropper.get() - | ^^^^^^^^^^^ +LL | let future = f(); + | ------ + | | + | `future` calls a custom destructor + | `future` will be dropped later as of Edition 2024 +... +LL | LoudDropper.get() + | ^^^^^^^^^^^ + | | + | this value will be stored in a temporary; let us call it `#1` + | up until Edition 2021 `#1` is dropped last but will be dropped earlier in Edition 2024 +... +LL | } + | - now the temporary value is dropped here, before the local variables in the block or statement | = warning: this changes meaning in Rust 2024 = note: for more information, see issue #123739 <https://github.com/rust-lang/rust/issues/123739> +note: `#1` invokes this custom destructor + --> $DIR/lint-tail-expr-drop-order.rs:11:1 + | +LL | / impl Drop for LoudDropper { +LL | | +LL | | +LL | | +... | +LL | | } +LL | | } + | |_^ +note: `future` invokes this custom destructor + --> $DIR/lint-tail-expr-drop-order.rs:11:1 + | +LL | / impl Drop for LoudDropper { +LL | | +LL | | +LL | | +... | +LL | | } +LL | | } + | |_^ + = note: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects like releasing locks or sending messages + +error: relative drop order changing in Rust 2024 + --> $DIR/lint-tail-expr-drop-order.rs:164:14 + | +LL | let x = T::default(); + | - + | | + | `x` calls a custom destructor + | `x` will be dropped later as of Edition 2024 +... +LL | extract(&T::default()) + | ^^^^^^^^^^^^ + | | + | this value will be stored in a temporary; let us call it `#1` + | up until Edition 2021 `#1` is dropped last but will be dropped earlier in Edition 2024 +... +LL | } + | - now the temporary value is dropped here, before the local variables in the block or statement + | + = warning: this changes meaning in Rust 2024 + = note: for more information, see issue #123739 <https://github.com/rust-lang/rust/issues/123739> + = note: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects like releasing locks or sending messages + +error: relative drop order changing in Rust 2024 + --> $DIR/lint-tail-expr-drop-order.rs:178:5 + | +LL | let x: Result<LoudDropper, ()> = Ok(LoudDropper); + | - + | | + | `x` calls a custom destructor + | `x` will be dropped later as of Edition 2024 +... +LL | LoudDropper.get() + | ^^^^^^^^^^^ + | | + | this value will be stored in a temporary; let us call it `#1` + | up until Edition 2021 `#1` is dropped last but will be dropped earlier in Edition 2024 +... +LL | } + | - now the temporary value is dropped here, before the local variables in the block or statement + | + = warning: this changes meaning in Rust 2024 + = note: for more information, see issue #123739 <https://github.com/rust-lang/rust/issues/123739> +note: `#1` invokes this custom destructor + --> $DIR/lint-tail-expr-drop-order.rs:11:1 + | +LL | / impl Drop for LoudDropper { +LL | | +LL | | +LL | | +... | +LL | | } +LL | | } + | |_^ +note: `x` invokes this custom destructor + --> $DIR/lint-tail-expr-drop-order.rs:11:1 + | +LL | / impl Drop for LoudDropper { +LL | | +LL | | +LL | | +... | +LL | | } +LL | | } + | |_^ + = note: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects like releasing locks or sending messages + +error: relative drop order changing in Rust 2024 + --> $DIR/lint-tail-expr-drop-order.rs:222:5 + | +LL | let x = LoudDropper2; + | - + | | + | `x` calls a custom destructor + | `x` will be dropped later as of Edition 2024 +... +LL | LoudDropper3.get() + | ^^^^^^^^^^^^ + | | + | this value will be stored in a temporary; let us call it `#1` + | up until Edition 2021 `#1` is dropped last but will be dropped earlier in Edition 2024 +... +LL | } + | - now the temporary value is dropped here, before the local variables in the block or statement + | + = warning: this changes meaning in Rust 2024 + = note: for more information, see issue #123739 <https://github.com/rust-lang/rust/issues/123739> +note: `#1` invokes this custom destructor + --> $DIR/lint-tail-expr-drop-order.rs:195:5 + | +LL | / impl Drop for LoudDropper3 { +LL | | +LL | | fn drop(&mut self) { +LL | | println!("loud drop"); +LL | | } +LL | | } + | |_____^ +note: `x` invokes this custom destructor + --> $DIR/lint-tail-expr-drop-order.rs:207:5 + | +LL | / impl Drop for LoudDropper2 { +LL | | +LL | | fn drop(&mut self) { +LL | | println!("loud drop"); +LL | | } +LL | | } + | |_____^ + = note: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects like releasing locks or sending messages + +error: relative drop order changing in Rust 2024 + --> $DIR/lint-tail-expr-drop-order.rs:235:13 + | +LL | LoudDropper.get() + | ^^^^^^^^^^^ + | | + | this value will be stored in a temporary; let us call it `#1` + | up until Edition 2021 `#1` is dropped last but will be dropped earlier in Edition 2024 +... +LL | let _x = LoudDropper; + | -- + | | + | `_x` calls a custom destructor + | `_x` will be dropped later as of Edition 2024 +... +LL | )); + | - now the temporary value is dropped here, before the local variables in the block or statement + | + = warning: this changes meaning in Rust 2024 + = note: for more information, see issue #123739 <https://github.com/rust-lang/rust/issues/123739> +note: `#1` invokes this custom destructor + --> $DIR/lint-tail-expr-drop-order.rs:11:1 + | +LL | / impl Drop for LoudDropper { +LL | | +LL | | +LL | | +... | +LL | | } +LL | | } + | |_^ +note: `_x` invokes this custom destructor + --> $DIR/lint-tail-expr-drop-order.rs:11:1 + | +LL | / impl Drop for LoudDropper { +LL | | +LL | | +LL | | +... | +LL | | } +LL | | } + | |_^ + = note: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects like releasing locks or sending messages -error: aborting due to 3 previous errors +error: aborting due to 8 previous errors diff --git a/tests/ui/dyn-star/async-block-dyn-star.rs b/tests/ui/dyn-star/async-block-dyn-star.rs new file mode 100644 index 00000000000..9bffd6c6725 --- /dev/null +++ b/tests/ui/dyn-star/async-block-dyn-star.rs @@ -0,0 +1,9 @@ +//@ edition:2018 + +#![feature(dyn_star, const_async_blocks)] +//~^ WARN the feature `dyn_star` is incomplete + +static S: dyn* Send + Sync = async { 42 }; +//~^ needs to have the same ABI as a pointer + +pub fn main() {} diff --git a/tests/ui/dyn-star/async-block-dyn-star.stderr b/tests/ui/dyn-star/async-block-dyn-star.stderr new file mode 100644 index 00000000000..f62c85c0ad2 --- /dev/null +++ b/tests/ui/dyn-star/async-block-dyn-star.stderr @@ -0,0 +1,20 @@ +warning: the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/async-block-dyn-star.rs:3:12 + | +LL | #![feature(dyn_star, const_async_blocks)] + | ^^^^^^^^ + | + = note: see issue #102425 <https://github.com/rust-lang/rust/issues/102425> for more information + = note: `#[warn(incomplete_features)]` on by default + +error[E0277]: `{async block@$DIR/async-block-dyn-star.rs:6:30: 6:35}` needs to have the same ABI as a pointer + --> $DIR/async-block-dyn-star.rs:6:30 + | +LL | static S: dyn* Send + Sync = async { 42 }; + | ^^^^^^^^^^^^ `{async block@$DIR/async-block-dyn-star.rs:6:30: 6:35}` needs to be a pointer-like type + | + = help: the trait `PointerLike` is not implemented for `{async block@$DIR/async-block-dyn-star.rs:6:30: 6:35}` + +error: aborting due to 1 previous error; 1 warning emitted + +For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.current.stderr b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.current.stderr index 7b5ea7bb707..a0aff69f396 100644 --- a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.current.stderr +++ b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.current.stderr @@ -1,14 +1,17 @@ error[E0277]: `&T` needs to have the same ABI as a pointer --> $DIR/check-size-at-cast-polymorphic-bad.rs:15:15 | +LL | fn polymorphic<T: Debug + ?Sized>(t: &T) { + | - this type parameter needs to be `Sized` LL | dyn_debug(t); | ^ `&T` needs to be a pointer-like type | - = help: the trait `PointerLike` is not implemented for `&T` -help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement + = note: required for `&T` to implement `PointerLike` +help: consider removing the `?Sized` bound to make the type parameter `Sized` + | +LL - fn polymorphic<T: Debug + ?Sized>(t: &T) { +LL + fn polymorphic<T: Debug>(t: &T) { | -LL | fn polymorphic<T: Debug + ?Sized>(t: &T) where &T: PointerLike { - | +++++++++++++++++++++ error: aborting due to 1 previous error diff --git a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.next.stderr b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.next.stderr index 7b5ea7bb707..a0aff69f396 100644 --- a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.next.stderr +++ b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.next.stderr @@ -1,14 +1,17 @@ error[E0277]: `&T` needs to have the same ABI as a pointer --> $DIR/check-size-at-cast-polymorphic-bad.rs:15:15 | +LL | fn polymorphic<T: Debug + ?Sized>(t: &T) { + | - this type parameter needs to be `Sized` LL | dyn_debug(t); | ^ `&T` needs to be a pointer-like type | - = help: the trait `PointerLike` is not implemented for `&T` -help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement + = note: required for `&T` to implement `PointerLike` +help: consider removing the `?Sized` bound to make the type parameter `Sized` + | +LL - fn polymorphic<T: Debug + ?Sized>(t: &T) { +LL + fn polymorphic<T: Debug>(t: &T) { | -LL | fn polymorphic<T: Debug + ?Sized>(t: &T) where &T: PointerLike { - | +++++++++++++++++++++ error: aborting due to 1 previous error diff --git a/tests/ui/dyn-star/drop.rs b/tests/ui/dyn-star/drop.rs index ca86f1b5b01..bc746331527 100644 --- a/tests/ui/dyn-star/drop.rs +++ b/tests/ui/dyn-star/drop.rs @@ -1,13 +1,18 @@ //@ run-pass //@ check-run-results -#![feature(dyn_star)] +#![feature(dyn_star, pointer_like_trait)] #![allow(incomplete_features)] use std::fmt::Debug; +use std::marker::PointerLike; #[derive(Debug)] +#[repr(transparent)] struct Foo(#[allow(dead_code)] usize); +// FIXME(dyn_star): Make this into a derive. +impl PointerLike for Foo {} + impl Drop for Foo { fn drop(&mut self) { println!("destructor called"); diff --git a/tests/ui/dyn-star/enum-cast.rs b/tests/ui/dyn-star/enum-cast.rs index 6e895e9527a..3cc7390eb12 100644 --- a/tests/ui/dyn-star/enum-cast.rs +++ b/tests/ui/dyn-star/enum-cast.rs @@ -3,13 +3,18 @@ // This used to ICE, because the compiler confused a pointer-like to dyn* coercion // with a c-like enum to integer cast. -#![feature(dyn_star)] +#![feature(dyn_star, pointer_like_trait)] #![expect(incomplete_features)] +use std::marker::PointerLike; + +#[repr(transparent)] enum E { Num(usize), } +impl PointerLike for E {} + trait Trait {} impl Trait for E {} diff --git a/tests/ui/dyn-star/error.rs b/tests/ui/dyn-star/error.rs index d8261387efa..7288596f3fa 100644 --- a/tests/ui/dyn-star/error.rs +++ b/tests/ui/dyn-star/error.rs @@ -7,7 +7,7 @@ trait Foo {} fn make_dyn_star() { let i = 42; - let dyn_i: dyn* Foo = i; //~ ERROR trait bound `{integer}: Foo` is not satisfied + let dyn_i: dyn* Foo = i; //~ ERROR trait bound `usize: Foo` is not satisfied } fn main() {} diff --git a/tests/ui/dyn-star/error.stderr b/tests/ui/dyn-star/error.stderr index a9f4a054519..55981c03bac 100644 --- a/tests/ui/dyn-star/error.stderr +++ b/tests/ui/dyn-star/error.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `{integer}: Foo` is not satisfied +error[E0277]: the trait bound `usize: Foo` is not satisfied --> $DIR/error.rs:10:27 | LL | let dyn_i: dyn* Foo = i; - | ^ the trait `Foo` is not implemented for `{integer}` + | ^ the trait `Foo` is not implemented for `usize` | help: this trait has no implementations, consider adding one --> $DIR/error.rs:6:1 diff --git a/tests/ui/dyn-star/float-as-dyn-star.rs b/tests/ui/dyn-star/float-as-dyn-star.rs new file mode 100644 index 00000000000..1b629c64c25 --- /dev/null +++ b/tests/ui/dyn-star/float-as-dyn-star.rs @@ -0,0 +1,16 @@ +//@ only-x86_64 + +#![feature(dyn_star, pointer_like_trait)] +//~^ WARN the feature `dyn_star` is incomplete + +use std::fmt::Debug; +use std::marker::PointerLike; + +fn make_dyn_star() -> dyn* Debug + 'static { + f32::from_bits(0x1) as f64 + //~^ ERROR `f64` needs to have the same ABI as a pointer +} + +fn main() { + println!("{:?}", make_dyn_star()); +} diff --git a/tests/ui/dyn-star/float-as-dyn-star.stderr b/tests/ui/dyn-star/float-as-dyn-star.stderr new file mode 100644 index 00000000000..9caba512e5f --- /dev/null +++ b/tests/ui/dyn-star/float-as-dyn-star.stderr @@ -0,0 +1,21 @@ +warning: the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/float-as-dyn-star.rs:3:12 + | +LL | #![feature(dyn_star, pointer_like_trait)] + | ^^^^^^^^ + | + = note: see issue #102425 <https://github.com/rust-lang/rust/issues/102425> for more information + = note: `#[warn(incomplete_features)]` on by default + +error[E0277]: `f64` needs to have the same ABI as a pointer + --> $DIR/float-as-dyn-star.rs:10:5 + | +LL | f32::from_bits(0x1) as f64 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `f64` needs to be a pointer-like type + | + = help: the trait `PointerLike` is not implemented for `f64` + = help: the trait `PointerLike` is implemented for `usize` + +error: aborting due to 1 previous error; 1 warning emitted + +For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/dyn-star/upcast.stderr b/tests/ui/dyn-star/upcast.stderr index adef9525bf1..801e1c233c1 100644 --- a/tests/ui/dyn-star/upcast.stderr +++ b/tests/ui/dyn-star/upcast.stderr @@ -7,6 +7,14 @@ LL | #![feature(dyn_star, trait_upcasting)] = note: see issue #102425 <https://github.com/rust-lang/rust/issues/102425> for more information = note: `#[warn(incomplete_features)]` on by default +error[E0277]: `W` needs to have the same ABI as a pointer + --> $DIR/upcast.rs:28:23 + | +LL | let w: dyn* Foo = W(0); + | ^^^^ `W` needs to be a pointer-like type + | + = help: the trait `PointerLike` is not implemented for `W` + error[E0277]: `dyn* Foo` needs to have the same ABI as a pointer --> $DIR/upcast.rs:30:23 | @@ -15,6 +23,6 @@ LL | let w: dyn* Bar = w; | = help: the trait `PointerLike` is not implemented for `dyn* Foo` -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 2 previous errors; 1 warning emitted For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/editions/never-type-fallback-breaking.e2021.fixed b/tests/ui/editions/never-type-fallback-breaking.e2021.fixed index 3fed16f0ee7..75bc598d17b 100644 --- a/tests/ui/editions/never-type-fallback-breaking.e2021.fixed +++ b/tests/ui/editions/never-type-fallback-breaking.e2021.fixed @@ -16,7 +16,7 @@ fn main() { fn m() { //[e2021]~^ this function depends on never type fallback being `()` - //[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + //[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! let x: () = match true { true => Default::default(), //[e2024]~^ error: the trait bound `!: Default` is not satisfied @@ -28,7 +28,7 @@ fn m() { fn q() -> Option<()> { //[e2021]~^ this function depends on never type fallback being `()` - //[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + //[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! fn deserialize<T: Default>() -> Option<T> { Some(T::default()) } @@ -45,7 +45,7 @@ fn help<'a: 'a, T: Into<()>, U>(_: U) -> Result<T, ()> { } fn meow() -> Result<(), ()> { //[e2021]~^ this function depends on never type fallback being `()` - //[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + //[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! help::<(), _>(1)?; //[e2024]~^ error: the trait bound `(): From<!>` is not satisfied Ok(()) diff --git a/tests/ui/editions/never-type-fallback-breaking.e2021.stderr b/tests/ui/editions/never-type-fallback-breaking.e2021.stderr index fdc97e54d4e..454e88d4569 100644 --- a/tests/ui/editions/never-type-fallback-breaking.e2021.stderr +++ b/tests/ui/editions/never-type-fallback-breaking.e2021.stderr @@ -4,7 +4,7 @@ warning: this function depends on never type fallback being `()` LL | fn m() { | ^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the types explicitly note: in edition 2024, the requirement `!: Default` will fail @@ -24,7 +24,7 @@ warning: this function depends on never type fallback being `()` LL | fn q() -> Option<()> { | ^^^^^^^^^^^^^^^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the types explicitly note: in edition 2024, the requirement `!: Default` will fail @@ -43,7 +43,7 @@ warning: this function depends on never type fallback being `()` LL | fn meow() -> Result<(), ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the types explicitly note: in edition 2024, the requirement `(): From<!>` will fail diff --git a/tests/ui/editions/never-type-fallback-breaking.rs b/tests/ui/editions/never-type-fallback-breaking.rs index 71d36f3a2d9..32e83e74139 100644 --- a/tests/ui/editions/never-type-fallback-breaking.rs +++ b/tests/ui/editions/never-type-fallback-breaking.rs @@ -16,7 +16,7 @@ fn main() { fn m() { //[e2021]~^ this function depends on never type fallback being `()` - //[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + //[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! let x = match true { true => Default::default(), //[e2024]~^ error: the trait bound `!: Default` is not satisfied @@ -28,7 +28,7 @@ fn m() { fn q() -> Option<()> { //[e2021]~^ this function depends on never type fallback being `()` - //[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + //[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! fn deserialize<T: Default>() -> Option<T> { Some(T::default()) } @@ -45,7 +45,7 @@ fn help<'a: 'a, T: Into<()>, U>(_: U) -> Result<T, ()> { } fn meow() -> Result<(), ()> { //[e2021]~^ this function depends on never type fallback being `()` - //[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + //[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! help(1)?; //[e2024]~^ error: the trait bound `(): From<!>` is not satisfied Ok(()) diff --git a/tests/ui/explore-issue-38412.rs b/tests/ui/explore-issue-38412.rs index e1295a96ba5..2008b120faa 100644 --- a/tests/ui/explore-issue-38412.rs +++ b/tests/ui/explore-issue-38412.rs @@ -1,9 +1,9 @@ //@ aux-build:pub-and-stability.rs -// A big point of this test is that we *declare* `unstable_declared`, -// but do *not* declare `unstable_undeclared`. This way we can check -// that the compiler is letting in uses of declared feature-gated -// stuff but still rejecting uses of undeclared feature-gated stuff. +// A big point of this test is that we *enable* `unstable_declared`, +// but do *not* enable `unstable_undeclared`. This way we can check +// that the compiler is letting in uses of enabled feature-gated +// stuff but still rejecting uses of disabled feature-gated stuff. #![feature(unstable_declared)] extern crate pub_and_stability; diff --git a/tests/ui/extern-flag/auxiliary/panic_handler.rs b/tests/ui/extern-flag/auxiliary/panic_handler.rs index 5ca32fa992b..9140ceed229 100644 --- a/tests/ui/extern-flag/auxiliary/panic_handler.rs +++ b/tests/ui/extern-flag/auxiliary/panic_handler.rs @@ -1,14 +1,10 @@ -#![feature(lang_items)] +#![feature(lang_items, panic_unwind)] #![no_std] -// Since `rustc` generally passes `-nodefaultlibs` to the linker, -// Rust programs link necessary system libraries via `#[link()]` -// attributes in the `libc` crate. `libc` is a dependency of `std`, -// but as we are `#![no_std]`, we need to include it manually. -// Except on windows-msvc. -#![feature(rustc_private)] -#[cfg(not(all(windows, target_env = "msvc")))] -extern crate libc; +// Since the `unwind` crate is a dependency of the `std` crate, and we have +// `#![no_std]`, the unwinder is not included in the link command by default. +// We need to include crate `unwind` manually. +extern crate unwind; #[panic_handler] pub fn begin_panic_handler(_info: &core::panic::PanicInfo<'_>) -> ! { diff --git a/tests/ui/feature-gates/feature-gate-large-assignments.rs b/tests/ui/feature-gates/feature-gate-large-assignments.rs index 7e9e574bfa0..c4125c55722 100644 --- a/tests/ui/feature-gates/feature-gate-large-assignments.rs +++ b/tests/ui/feature-gates/feature-gate-large-assignments.rs @@ -1,4 +1,4 @@ -// check that `move_size_limit is feature-gated +// check that `move_size_limit` is feature-gated #![move_size_limit = "42"] //~ ERROR the `#[move_size_limit]` attribute is an experimental feature diff --git a/tests/ui/feature-gates/feature-gate-link-arg-attribute.stderr b/tests/ui/feature-gates/feature-gate-link-arg-attribute.in_attr.stderr index 8cbad78478e..3ea8c89bf3a 100644 --- a/tests/ui/feature-gates/feature-gate-link-arg-attribute.stderr +++ b/tests/ui/feature-gates/feature-gate-link-arg-attribute.in_attr.stderr @@ -1,5 +1,5 @@ error[E0658]: link kind `link-arg` is unstable - --> $DIR/feature-gate-link-arg-attribute.rs:1:15 + --> $DIR/feature-gate-link-arg-attribute.rs:5:15 | LL | #[link(kind = "link-arg", name = "foo")] | ^^^^^^^^^^ diff --git a/tests/ui/feature-gates/feature-gate-link-arg-attribute.in_flag.stderr b/tests/ui/feature-gates/feature-gate-link-arg-attribute.in_flag.stderr new file mode 100644 index 00000000000..4d65db3c66d --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-link-arg-attribute.in_flag.stderr @@ -0,0 +1,2 @@ +error: unknown linking modifier `link-arg`, expected one of: bundle, verbatim, whole-archive, as-needed + diff --git a/tests/ui/feature-gates/feature-gate-link-arg-attribute.rs b/tests/ui/feature-gates/feature-gate-link-arg-attribute.rs index 9036095fbc4..c12ff5b04dc 100644 --- a/tests/ui/feature-gates/feature-gate-link-arg-attribute.rs +++ b/tests/ui/feature-gates/feature-gate-link-arg-attribute.rs @@ -1,5 +1,9 @@ +//@ revisions: in_attr in_flag +//@[in_flag] compile-flags: -l dylib:+link-arg=foo + +#[cfg(in_attr)] #[link(kind = "link-arg", name = "foo")] -//~^ ERROR link kind `link-arg` is unstable +//[in_attr]~^ ERROR link kind `link-arg` is unstable extern "C" {} fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-min-generic-const-args.rs b/tests/ui/feature-gates/feature-gate-min-generic-const-args.rs new file mode 100644 index 00000000000..171509876d1 --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-min-generic-const-args.rs @@ -0,0 +1,11 @@ +trait Trait { + const ASSOC: usize; +} + +// FIXME(min_generic_const_args): implement support for this, behind the feature gate +fn foo<T: Trait>() -> [u8; <T as Trait>::ASSOC] { + //~^ ERROR generic parameters may not be used in const operations + loop {} +} + +fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-min-generic-const-args.stderr b/tests/ui/feature-gates/feature-gate-min-generic-const-args.stderr new file mode 100644 index 00000000000..04d96b4c11e --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-min-generic-const-args.stderr @@ -0,0 +1,11 @@ +error: generic parameters may not be used in const operations + --> $DIR/feature-gate-min-generic-const-args.rs:6:29 + | +LL | fn foo<T: Trait>() -> [u8; <T as Trait>::ASSOC] { + | ^ cannot perform const operation using `T` + | + = note: type parameters may not be used in const expressions + = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions + +error: aborting due to 1 previous error + diff --git a/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.stderr b/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.in_attr.stderr index 216477828e7..11b7abc883e 100644 --- a/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.stderr +++ b/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.in_attr.stderr @@ -1,5 +1,5 @@ error[E0658]: linking modifier `as-needed` is unstable - --> $DIR/feature-gate-native_link_modifiers_as_needed.rs:1:50 + --> $DIR/feature-gate-native_link_modifiers_as_needed.rs:5:50 | LL | #[link(name = "foo", kind = "dylib", modifiers = "+as-needed")] | ^^^^^^^^^^^^ diff --git a/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.in_flag.stderr b/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.in_flag.stderr new file mode 100644 index 00000000000..8f74e9d6f16 --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.in_flag.stderr @@ -0,0 +1,2 @@ +error: linking modifier `as-needed` is unstable, the `-Z unstable-options` flag must also be passed to use it + diff --git a/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.rs b/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.rs index 132bc6ab04a..c2965e42f27 100644 --- a/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.rs +++ b/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.rs @@ -1,5 +1,9 @@ +//@ revisions: in_attr in_flag +//@[in_flag] compile-flags: -l dylib:+as-needed=foo + +#[cfg(in_attr)] #[link(name = "foo", kind = "dylib", modifiers = "+as-needed")] -//~^ ERROR: linking modifier `as-needed` is unstable +//[in_attr]~^ ERROR: linking modifier `as-needed` is unstable extern "C" {} fn main() {} diff --git a/tests/ui/generics/generics-on-self-mod-segment.rs b/tests/ui/generics/generics-on-self-mod-segment.rs new file mode 100644 index 00000000000..ef229eeba53 --- /dev/null +++ b/tests/ui/generics/generics-on-self-mod-segment.rs @@ -0,0 +1,18 @@ +struct Ty; + +fn self_(_: self::<i32>::Ty) {} +//~^ ERROR type arguments are not allowed on module `generics_on_self_mod_segment` + +fn crate_(_: crate::<i32>::Ty) {} +//~^ ERROR type arguments are not allowed on module `generics_on_self_mod_segment` + +macro_rules! dollar_crate { + () => { + fn dollar_crate_(_: $crate::<i32>::Ty) {} + //~^ ERROR type arguments are not allowed on module `generics_on_self_mod_segment` + } +} + +dollar_crate!(); + +fn main() {} diff --git a/tests/ui/generics/generics-on-self-mod-segment.stderr b/tests/ui/generics/generics-on-self-mod-segment.stderr new file mode 100644 index 00000000000..4a2d5939a3e --- /dev/null +++ b/tests/ui/generics/generics-on-self-mod-segment.stderr @@ -0,0 +1,32 @@ +error[E0109]: type arguments are not allowed on module `generics_on_self_mod_segment` + --> $DIR/generics-on-self-mod-segment.rs:3:20 + | +LL | fn self_(_: self::<i32>::Ty) {} + | ---- ^^^ type argument not allowed + | | + | not allowed on module `generics_on_self_mod_segment` + +error[E0109]: type arguments are not allowed on module `generics_on_self_mod_segment` + --> $DIR/generics-on-self-mod-segment.rs:6:22 + | +LL | fn crate_(_: crate::<i32>::Ty) {} + | ----- ^^^ type argument not allowed + | | + | not allowed on module `generics_on_self_mod_segment` + +error[E0109]: type arguments are not allowed on module `generics_on_self_mod_segment` + --> $DIR/generics-on-self-mod-segment.rs:11:38 + | +LL | fn dollar_crate_(_: $crate::<i32>::Ty) {} + | ------ ^^^ type argument not allowed + | | + | not allowed on module `generics_on_self_mod_segment` +... +LL | dollar_crate!(); + | --------------- in this macro invocation + | + = note: this error originates in the macro `dollar_crate` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0109`. diff --git a/tests/ui/impl-trait/in-trait/refine-captures.rs b/tests/ui/impl-trait/in-trait/refine-captures.rs new file mode 100644 index 00000000000..e7dffcb52aa --- /dev/null +++ b/tests/ui/impl-trait/in-trait/refine-captures.rs @@ -0,0 +1,36 @@ +#![feature(precise_capturing_in_traits)] + +trait LifetimeParam<'a> { + fn test() -> impl Sized; +} +// Refining via capturing fewer lifetimes than the trait definition. +impl<'a> LifetimeParam<'a> for i32 { + fn test() -> impl Sized + use<> {} + //~^ WARN impl trait in impl method captures fewer lifetimes than in trait +} +// If the lifetime is substituted, then we don't refine anything. +impl LifetimeParam<'static> for u32 { + fn test() -> impl Sized + use<> {} + // Ok +} + +trait TypeParam<T> { + fn test() -> impl Sized; +} +// Indirectly capturing a lifetime param through a type param substitution. +impl<'a> TypeParam<&'a ()> for i32 { + fn test() -> impl Sized + use<> {} + //~^ WARN impl trait in impl method captures fewer lifetimes than in trait +} +// Two of them, but only one is captured... +impl<'a, 'b> TypeParam<(&'a (), &'b ())> for u32 { + fn test() -> impl Sized + use<'b> {} + //~^ WARN impl trait in impl method captures fewer lifetimes than in trait +} +// What if we don't capture a type param? That should be an error otherwise. +impl<T> TypeParam<T> for u64 { + fn test() -> impl Sized + use<> {} + //~^ ERROR `impl Trait` must mention all type parameters in scope in `use<...>` +} + +fn main() {} diff --git a/tests/ui/impl-trait/in-trait/refine-captures.stderr b/tests/ui/impl-trait/in-trait/refine-captures.stderr new file mode 100644 index 00000000000..ad2c2a11601 --- /dev/null +++ b/tests/ui/impl-trait/in-trait/refine-captures.stderr @@ -0,0 +1,52 @@ +warning: impl trait in impl method captures fewer lifetimes than in trait + --> $DIR/refine-captures.rs:8:31 + | +LL | fn test() -> impl Sized + use<> {} + | ^^^^^ + | + = note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate + = note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information + = note: `#[warn(refining_impl_trait_internal)]` on by default +help: modify the `use<..>` bound to capture the same lifetimes that the trait does + | +LL | fn test() -> impl Sized + use<'a> {} + | ~~~~~~~ + +warning: impl trait in impl method captures fewer lifetimes than in trait + --> $DIR/refine-captures.rs:22:31 + | +LL | fn test() -> impl Sized + use<> {} + | ^^^^^ + | + = note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate + = note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information +help: modify the `use<..>` bound to capture the same lifetimes that the trait does + | +LL | fn test() -> impl Sized + use<'a> {} + | ~~~~~~~ + +warning: impl trait in impl method captures fewer lifetimes than in trait + --> $DIR/refine-captures.rs:27:31 + | +LL | fn test() -> impl Sized + use<'b> {} + | ^^^^^^^ + | + = note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate + = note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information +help: modify the `use<..>` bound to capture the same lifetimes that the trait does + | +LL | fn test() -> impl Sized + use<'a, 'b> {} + | ~~~~~~~~~~~ + +error: `impl Trait` must mention all type parameters in scope in `use<...>` + --> $DIR/refine-captures.rs:32:18 + | +LL | impl<T> TypeParam<T> for u64 { + | - type parameter is implicitly captured by this `impl Trait` +LL | fn test() -> impl Sized + use<> {} + | ^^^^^^^^^^^^^^^^^^ + | + = note: currently, all type parameters are required to be mentioned in the precise captures list + +error: aborting due to 1 previous error; 3 warnings emitted + diff --git a/tests/ui/impl-trait/precise-capturing/auxiliary/no-use-macro.rs b/tests/ui/impl-trait/precise-capturing/auxiliary/no-use-macro.rs new file mode 100644 index 00000000000..2efdc2342c1 --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/auxiliary/no-use-macro.rs @@ -0,0 +1,20 @@ +// A macro_rules macro in 2015 that has an RPIT without `use<>` that would +// cause a problem with 2024 capturing rules. + +#[macro_export] +macro_rules! macro_rpit { + () => { + fn test_mbe(x: &Vec<i32>) -> impl std::fmt::Display { + x[0] + } + + pub fn from_mbe() { + let mut x = vec![]; + x.push(1); + + let element = test_mbe(&x); + x.push(2); + println!("{element}"); + } + }; +} diff --git a/tests/ui/impl-trait/precise-capturing/auxiliary/no-use-pm.rs b/tests/ui/impl-trait/precise-capturing/auxiliary/no-use-pm.rs new file mode 100644 index 00000000000..e197dcfef80 --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/auxiliary/no-use-pm.rs @@ -0,0 +1,29 @@ +// A proc-macro in 2015 that has an RPIT without `use<>` that would cause a +// problem with 2024 capturing rules. + +//@ force-host +//@ no-prefer-dynamic + +#![crate_type = "proc-macro"] + +extern crate proc_macro; +use proc_macro::TokenStream; + +#[proc_macro] +pub fn pm_rpit(input: TokenStream) -> TokenStream { + "fn test_pm(x: &Vec<i32>) -> impl std::fmt::Display { + x[0] +} + +pub fn from_pm() { + let mut x = vec![]; + x.push(1); + + let element = test_pm(&x); + x.push(2); + println!(\"{element}\"); +} +" + .parse() + .unwrap() +} diff --git a/tests/ui/impl-trait/precise-capturing/external-macro.rs b/tests/ui/impl-trait/precise-capturing/external-macro.rs new file mode 100644 index 00000000000..492e8036461 --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/external-macro.rs @@ -0,0 +1,26 @@ +// Tests that code generated from an external macro (MBE and proc-macro) that +// has an RPIT will not fail when the call-site is 2024. +// https://github.com/rust-lang/rust/issues/132917 + +//@ aux-crate: no_use_pm=no-use-pm.rs +//@ aux-crate: no_use_macro=no-use-macro.rs +//@ edition: 2024 +//@ compile-flags:-Z unstable-options +//@ check-pass + +no_use_pm::pm_rpit!{} + +no_use_macro::macro_rpit!{} + +fn main() { + let mut x = vec![]; + x.push(1); + + let element = test_pm(&x); + x.push(2); + println!("{element}"); + + let element = test_mbe(&x); + x.push(2); + println!("{element}"); +} diff --git a/tests/ui/impl-trait/precise-capturing/overcaptures-2024.fixed b/tests/ui/impl-trait/precise-capturing/overcaptures-2024.fixed index 6a9d72d028c..1eb88c71d54 100644 --- a/tests/ui/impl-trait/precise-capturing/overcaptures-2024.fixed +++ b/tests/ui/impl-trait/precise-capturing/overcaptures-2024.fixed @@ -1,4 +1,5 @@ //@ run-rustfix +//@ edition: 2018 #![allow(unused)] #![deny(impl_trait_overcaptures)] @@ -37,4 +38,8 @@ fn apit2<U, T: Sized>(_: &T, _: U) -> impl Sized + use<U, T> {} //~^ ERROR `impl Sized` will capture more lifetimes than possibly intended in edition 2024 //~| WARN this changes meaning in Rust 2024 +async fn async_fn<'a>(x: &'a ()) -> impl Sized + use<> {} +//~^ ERROR `impl Sized` will capture more lifetimes than possibly intended in edition 2024 +//~| WARN this changes meaning in Rust 2024 + fn main() {} diff --git a/tests/ui/impl-trait/precise-capturing/overcaptures-2024.rs b/tests/ui/impl-trait/precise-capturing/overcaptures-2024.rs index 3a4f5ebb7fb..6f1ef6a472f 100644 --- a/tests/ui/impl-trait/precise-capturing/overcaptures-2024.rs +++ b/tests/ui/impl-trait/precise-capturing/overcaptures-2024.rs @@ -1,4 +1,5 @@ //@ run-rustfix +//@ edition: 2018 #![allow(unused)] #![deny(impl_trait_overcaptures)] @@ -37,4 +38,8 @@ fn apit2<U>(_: &impl Sized, _: U) -> impl Sized {} //~^ ERROR `impl Sized` will capture more lifetimes than possibly intended in edition 2024 //~| WARN this changes meaning in Rust 2024 +async fn async_fn<'a>(x: &'a ()) -> impl Sized {} +//~^ ERROR `impl Sized` will capture more lifetimes than possibly intended in edition 2024 +//~| WARN this changes meaning in Rust 2024 + fn main() {} diff --git a/tests/ui/impl-trait/precise-capturing/overcaptures-2024.stderr b/tests/ui/impl-trait/precise-capturing/overcaptures-2024.stderr index c101b980c71..63c87cd46c8 100644 --- a/tests/ui/impl-trait/precise-capturing/overcaptures-2024.stderr +++ b/tests/ui/impl-trait/precise-capturing/overcaptures-2024.stderr @@ -1,5 +1,5 @@ error: `impl Sized` will capture more lifetimes than possibly intended in edition 2024 - --> $DIR/overcaptures-2024.rs:6:29 + --> $DIR/overcaptures-2024.rs:7:29 | LL | fn named<'a>(x: &'a i32) -> impl Sized { *x } | ^^^^^^^^^^ @@ -7,13 +7,13 @@ LL | fn named<'a>(x: &'a i32) -> impl Sized { *x } = warning: this changes meaning in Rust 2024 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html> note: specifically, this lifetime is in scope but not mentioned in the type's bounds - --> $DIR/overcaptures-2024.rs:6:10 + --> $DIR/overcaptures-2024.rs:7:10 | LL | fn named<'a>(x: &'a i32) -> impl Sized { *x } | ^^ = note: all lifetimes in scope will be captured by `impl Trait`s in edition 2024 note: the lint level is defined here - --> $DIR/overcaptures-2024.rs:4:9 + --> $DIR/overcaptures-2024.rs:5:9 | LL | #![deny(impl_trait_overcaptures)] | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -23,7 +23,7 @@ LL | fn named<'a>(x: &'a i32) -> impl Sized + use<> { *x } | +++++++ error: `impl Sized` will capture more lifetimes than possibly intended in edition 2024 - --> $DIR/overcaptures-2024.rs:10:25 + --> $DIR/overcaptures-2024.rs:11:25 | LL | fn implicit(x: &i32) -> impl Sized { *x } | ^^^^^^^^^^ @@ -31,7 +31,7 @@ LL | fn implicit(x: &i32) -> impl Sized { *x } = warning: this changes meaning in Rust 2024 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html> note: specifically, this lifetime is in scope but not mentioned in the type's bounds - --> $DIR/overcaptures-2024.rs:10:16 + --> $DIR/overcaptures-2024.rs:11:16 | LL | fn implicit(x: &i32) -> impl Sized { *x } | ^ @@ -42,7 +42,7 @@ LL | fn implicit(x: &i32) -> impl Sized + use<> { *x } | +++++++ error: `impl Sized + '_` will capture more lifetimes than possibly intended in edition 2024 - --> $DIR/overcaptures-2024.rs:16:33 + --> $DIR/overcaptures-2024.rs:17:33 | LL | fn hello(&self, x: &i32) -> impl Sized + '_ { self } | ^^^^^^^^^^^^^^^ @@ -50,7 +50,7 @@ LL | fn hello(&self, x: &i32) -> impl Sized + '_ { self } = warning: this changes meaning in Rust 2024 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html> note: specifically, this lifetime is in scope but not mentioned in the type's bounds - --> $DIR/overcaptures-2024.rs:16:24 + --> $DIR/overcaptures-2024.rs:17:24 | LL | fn hello(&self, x: &i32) -> impl Sized + '_ { self } | ^ @@ -61,7 +61,7 @@ LL | fn hello(&self, x: &i32) -> impl Sized + '_ + use<'_> { self } | +++++++++ error: `impl Sized` will capture more lifetimes than possibly intended in edition 2024 - --> $DIR/overcaptures-2024.rs:28:47 + --> $DIR/overcaptures-2024.rs:29:47 | LL | fn hrtb() -> impl for<'a> Higher<'a, Output = impl Sized> {} | ^^^^^^^^^^ @@ -69,7 +69,7 @@ LL | fn hrtb() -> impl for<'a> Higher<'a, Output = impl Sized> {} = warning: this changes meaning in Rust 2024 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html> note: specifically, this lifetime is in scope but not mentioned in the type's bounds - --> $DIR/overcaptures-2024.rs:28:23 + --> $DIR/overcaptures-2024.rs:29:23 | LL | fn hrtb() -> impl for<'a> Higher<'a, Output = impl Sized> {} | ^^ @@ -80,7 +80,7 @@ LL | fn hrtb() -> impl for<'a> Higher<'a, Output = impl Sized + use<>> {} | +++++++ error: `impl Sized` will capture more lifetimes than possibly intended in edition 2024 - --> $DIR/overcaptures-2024.rs:32:28 + --> $DIR/overcaptures-2024.rs:33:28 | LL | fn apit(_: &impl Sized) -> impl Sized {} | ^^^^^^^^^^ @@ -88,13 +88,13 @@ LL | fn apit(_: &impl Sized) -> impl Sized {} = warning: this changes meaning in Rust 2024 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html> note: specifically, this lifetime is in scope but not mentioned in the type's bounds - --> $DIR/overcaptures-2024.rs:32:12 + --> $DIR/overcaptures-2024.rs:33:12 | LL | fn apit(_: &impl Sized) -> impl Sized {} | ^ = note: all lifetimes in scope will be captured by `impl Trait`s in edition 2024 note: you could use a `use<...>` bound to explicitly specify captures, but argument-position `impl Trait`s are not nameable - --> $DIR/overcaptures-2024.rs:32:13 + --> $DIR/overcaptures-2024.rs:33:13 | LL | fn apit(_: &impl Sized) -> impl Sized {} | ^^^^^^^^^^ @@ -104,7 +104,7 @@ LL | fn apit<T: Sized>(_: &T) -> impl Sized + use<T> {} | ++++++++++ ~ ++++++++ error: `impl Sized` will capture more lifetimes than possibly intended in edition 2024 - --> $DIR/overcaptures-2024.rs:36:38 + --> $DIR/overcaptures-2024.rs:37:38 | LL | fn apit2<U>(_: &impl Sized, _: U) -> impl Sized {} | ^^^^^^^^^^ @@ -112,13 +112,13 @@ LL | fn apit2<U>(_: &impl Sized, _: U) -> impl Sized {} = warning: this changes meaning in Rust 2024 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html> note: specifically, this lifetime is in scope but not mentioned in the type's bounds - --> $DIR/overcaptures-2024.rs:36:16 + --> $DIR/overcaptures-2024.rs:37:16 | LL | fn apit2<U>(_: &impl Sized, _: U) -> impl Sized {} | ^ = note: all lifetimes in scope will be captured by `impl Trait`s in edition 2024 note: you could use a `use<...>` bound to explicitly specify captures, but argument-position `impl Trait`s are not nameable - --> $DIR/overcaptures-2024.rs:36:17 + --> $DIR/overcaptures-2024.rs:37:17 | LL | fn apit2<U>(_: &impl Sized, _: U) -> impl Sized {} | ^^^^^^^^^^ @@ -127,5 +127,24 @@ help: use the precise capturing `use<...>` syntax to make the captures explicit LL | fn apit2<U, T: Sized>(_: &T, _: U) -> impl Sized + use<U, T> {} | ++++++++++ ~ +++++++++++ -error: aborting due to 6 previous errors +error: `impl Sized` will capture more lifetimes than possibly intended in edition 2024 + --> $DIR/overcaptures-2024.rs:41:37 + | +LL | async fn async_fn<'a>(x: &'a ()) -> impl Sized {} + | ^^^^^^^^^^ + | + = warning: this changes meaning in Rust 2024 + = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html> +note: specifically, this lifetime is in scope but not mentioned in the type's bounds + --> $DIR/overcaptures-2024.rs:41:19 + | +LL | async fn async_fn<'a>(x: &'a ()) -> impl Sized {} + | ^^ + = note: all lifetimes in scope will be captured by `impl Trait`s in edition 2024 +help: use the precise capturing `use<...>` syntax to make the captures explicit + | +LL | async fn async_fn<'a>(x: &'a ()) -> impl Sized + use<> {} + | +++++++ + +error: aborting due to 7 previous errors diff --git a/tests/ui/intrinsics/reify-intrinsic.rs b/tests/ui/intrinsics/reify-intrinsic.rs index 6c52651f060..0d047ccf4a3 100644 --- a/tests/ui/intrinsics/reify-intrinsic.rs +++ b/tests/ui/intrinsics/reify-intrinsic.rs @@ -13,9 +13,9 @@ fn b() { } fn c() { - let _: [unsafe extern "rust-intrinsic" fn(bool) -> bool; 2] = [ - std::intrinsics::likely, //~ ERROR cannot coerce - std::intrinsics::unlikely, + let _: [unsafe extern "rust-intrinsic" fn(f32) -> f32; 2] = [ + std::intrinsics::floorf32, //~ ERROR cannot coerce + std::intrinsics::log2f32, ]; } diff --git a/tests/ui/intrinsics/reify-intrinsic.stderr b/tests/ui/intrinsics/reify-intrinsic.stderr index 7af17147f28..a456e81e762 100644 --- a/tests/ui/intrinsics/reify-intrinsic.stderr +++ b/tests/ui/intrinsics/reify-intrinsic.stderr @@ -18,11 +18,11 @@ LL | let _ = std::mem::transmute as unsafe extern "rust-intrinsic" fn(isize) error[E0308]: cannot coerce intrinsics to function pointers --> $DIR/reify-intrinsic.rs:17:9 | -LL | std::intrinsics::likely, - | ^^^^^^^^^^^^^^^^^^^^^^^ cannot coerce intrinsics to function pointers +LL | std::intrinsics::floorf32, + | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot coerce intrinsics to function pointers | = note: expected fn pointer `unsafe extern "rust-intrinsic" fn(_) -> _` - found fn item `fn(_) -> _ {likely}` + found fn item `unsafe extern "rust-intrinsic" fn(_) -> _ {floorf32}` error: aborting due to 3 previous errors diff --git a/tests/ui/invalid/invalid-rustc_legacy_const_generics-issue-123077.rs b/tests/ui/invalid/invalid-rustc_legacy_const_generics-issue-123077.rs new file mode 100644 index 00000000000..8d854c6c237 --- /dev/null +++ b/tests/ui/invalid/invalid-rustc_legacy_const_generics-issue-123077.rs @@ -0,0 +1,31 @@ +//@ only-x86_64 + +const fn foo<const U: i32>() -> i32 { + U +} + +fn main() { + std::arch::x86_64::_mm_blend_ps(loop {}, loop {}, || ()); + //~^ invalid argument to a legacy const generic + + std::arch::x86_64::_mm_blend_ps(loop {}, loop {}, 5 + || ()); + //~^ invalid argument to a legacy const generic + + std::arch::x86_64::_mm_blend_ps(loop {}, loop {}, foo::<{ 1 + 2 }>()); + //~^ invalid argument to a legacy const generic + + std::arch::x86_64::_mm_blend_ps(loop {}, loop {}, foo::<3>()); + //~^ invalid argument to a legacy const generic + + std::arch::x86_64::_mm_blend_ps(loop {}, loop {}, &const {}); + //~^ invalid argument to a legacy const generic + + std::arch::x86_64::_mm_blend_ps(loop {}, loop {}, { + struct F(); + //~^ invalid argument to a legacy const generic + 1 + }); + + std::arch::x86_64::_mm_inserti_si64(loop {}, loop {}, || (), 1 + || ()); + //~^ invalid argument to a legacy const generic +} diff --git a/tests/ui/invalid/invalid-rustc_legacy_const_generics-issue-123077.stderr b/tests/ui/invalid/invalid-rustc_legacy_const_generics-issue-123077.stderr new file mode 100644 index 00000000000..7e05ae4f20c --- /dev/null +++ b/tests/ui/invalid/invalid-rustc_legacy_const_generics-issue-123077.stderr @@ -0,0 +1,82 @@ +error: invalid argument to a legacy const generic: cannot have const blocks, closures, async blocks or items + --> $DIR/invalid-rustc_legacy_const_generics-issue-123077.rs:8:55 + | +LL | std::arch::x86_64::_mm_blend_ps(loop {}, loop {}, || ()); + | ^^^^^ + | +help: try using a const generic argument instead + | +LL | std::arch::x86_64::_mm_blend_ps::<{ || () }>(loop {}, loop {}); + | +++++++++++++ ~~~~~~~~~~~~~~~~ + +error: invalid argument to a legacy const generic: cannot have const blocks, closures, async blocks or items + --> $DIR/invalid-rustc_legacy_const_generics-issue-123077.rs:11:59 + | +LL | std::arch::x86_64::_mm_blend_ps(loop {}, loop {}, 5 + || ()); + | ^^^^^ + | +help: try using a const generic argument instead + | +LL | std::arch::x86_64::_mm_blend_ps::<{ 5 + (|| ()) }>(loop {}, loop {}); + | +++++++++++++++++++ ~~~~~~~~~~~~~~~~ + +error: invalid argument to a legacy const generic: cannot have const blocks, closures, async blocks or items + --> $DIR/invalid-rustc_legacy_const_generics-issue-123077.rs:14:61 + | +LL | std::arch::x86_64::_mm_blend_ps(loop {}, loop {}, foo::<{ 1 + 2 }>()); + | ^^^^^^^^^ + | +help: try using a const generic argument instead + | +LL | std::arch::x86_64::_mm_blend_ps::<{ foo::<{ 1 + 2 }>() }>(loop {}, loop {}); + | ++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~ + +error: invalid argument to a legacy const generic: cannot have const blocks, closures, async blocks or items + --> $DIR/invalid-rustc_legacy_const_generics-issue-123077.rs:17:61 + | +LL | std::arch::x86_64::_mm_blend_ps(loop {}, loop {}, foo::<3>()); + | ^ + | +help: try using a const generic argument instead + | +LL | std::arch::x86_64::_mm_blend_ps::<{ foo::<3>() }>(loop {}, loop {}); + | ++++++++++++++++++ ~~~~~~~~~~~~~~~~ + +error: invalid argument to a legacy const generic: cannot have const blocks, closures, async blocks or items + --> $DIR/invalid-rustc_legacy_const_generics-issue-123077.rs:20:56 + | +LL | std::arch::x86_64::_mm_blend_ps(loop {}, loop {}, &const {}); + | ^^^^^^^^ + | +help: try using a const generic argument instead + | +LL | std::arch::x86_64::_mm_blend_ps::<{ &const {} }>(loop {}, loop {}); + | +++++++++++++++++ ~~~~~~~~~~~~~~~~ + +error: invalid argument to a legacy const generic: cannot have const blocks, closures, async blocks or items + --> $DIR/invalid-rustc_legacy_const_generics-issue-123077.rs:24:9 + | +LL | struct F(); + | ^^^^^^^^^^^ + | +help: try using a const generic argument instead + | +LL ~ std::arch::x86_64::_mm_blend_ps::<{ { +LL + struct F(); +LL + 1 +LL ~ } }>(loop {}, loop {}); + | + +error: invalid argument to a legacy const generic: cannot have const blocks, closures, async blocks or items + --> $DIR/invalid-rustc_legacy_const_generics-issue-123077.rs:29:59 + | +LL | std::arch::x86_64::_mm_inserti_si64(loop {}, loop {}, || (), 1 + || ()); + | ^^^^^ + | +help: try using a const generic argument instead + | +LL | std::arch::x86_64::_mm_inserti_si64::<{ || () }, { 1 + (|| ()) }>(loop {}, loop {}); + | ++++++++++++++++++++++++++++++ ~~~~~~~~~~~~~~~~ + +error: aborting due to 7 previous errors + diff --git a/tests/ui/issues/issue-39848.stderr b/tests/ui/issues/issue-39848.stderr index a6c6c61f170..1ffed2d4a1d 100644 --- a/tests/ui/issues/issue-39848.stderr +++ b/tests/ui/issues/issue-39848.stderr @@ -16,10 +16,10 @@ LL | if $tgt.has_$field() {} LL | get_opt!(bar, foo); | ------------------ in this macro invocation = note: this error originates in the macro `get_opt` (in Nightly builds, run with -Z macro-backtrace for more info) -help: try placing this code inside a block +help: you might have meant to write a method call | -LL | if $tgt.has_{ $field() } {} - | + + +LL | if $tgt.has_.$field() {} + | + error: aborting due to 1 previous error diff --git a/tests/ui/let-else/let-else-if.stderr b/tests/ui/let-else/let-else-if.stderr index 7e2215c8c05..ad36b423150 100644 --- a/tests/ui/let-else/let-else-if.stderr +++ b/tests/ui/let-else/let-else-if.stderr @@ -4,7 +4,7 @@ error: conditional `else if` is not supported for `let...else` LL | let Some(_) = Some(()) else if true { | ^^ expected `{` | -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL ~ let Some(_) = Some(()) else { if true { LL | diff --git a/tests/ui/lint/dangling-pointers-from-temporaries/types.rs b/tests/ui/lint/dangling-pointers-from-temporaries/types.rs index 2b515d3e6d5..17c3eca89e2 100644 --- a/tests/ui/lint/dangling-pointers-from-temporaries/types.rs +++ b/tests/ui/lint/dangling-pointers-from-temporaries/types.rs @@ -1,6 +1,7 @@ #![deny(dangling_pointers_from_temporaries)] +#![feature(sync_unsafe_cell)] -use std::cell::Cell; +use std::cell::{Cell, SyncUnsafeCell, UnsafeCell}; use std::ffi::{CStr, CString}; use std::mem::MaybeUninit; @@ -47,6 +48,10 @@ fn main() { //~^ ERROR a dangling pointer will be produced because the temporary `MaybeUninit<u8>` will be dropped declval::<Vec<AsPtrFake>>().as_ptr(); //~^ ERROR a dangling pointer will be produced because the temporary `Vec<AsPtrFake>` will be dropped + declval::<UnsafeCell<u8>>().get(); + //~^ ERROR a dangling pointer will be produced because the temporary `UnsafeCell<u8>` will be dropped + declval::<SyncUnsafeCell<u8>>().get(); + //~^ ERROR a dangling pointer will be produced because the temporary `SyncUnsafeCell<u8>` will be dropped declval::<Box<AsPtrFake>>().as_ptr(); declval::<AsPtrFake>().as_ptr(); } diff --git a/tests/ui/lint/dangling-pointers-from-temporaries/types.stderr b/tests/ui/lint/dangling-pointers-from-temporaries/types.stderr index c582a4c6540..250ed6dc9e3 100644 --- a/tests/ui/lint/dangling-pointers-from-temporaries/types.stderr +++ b/tests/ui/lint/dangling-pointers-from-temporaries/types.stderr @@ -1,5 +1,5 @@ error: a dangling pointer will be produced because the temporary `CString` will be dropped - --> $DIR/types.rs:20:26 + --> $DIR/types.rs:21:26 | LL | declval::<CString>().as_ptr(); | -------------------- ^^^^^^ this pointer will immediately be invalid @@ -15,7 +15,7 @@ LL | #![deny(dangling_pointers_from_temporaries)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: a dangling pointer will be produced because the temporary `String` will be dropped - --> $DIR/types.rs:22:25 + --> $DIR/types.rs:23:25 | LL | declval::<String>().as_ptr(); | ------------------- ^^^^^^ this pointer will immediately be invalid @@ -26,7 +26,7 @@ LL | declval::<String>().as_ptr(); = help: for more information, see <https://doc.rust-lang.org/reference/destructors.html> error: a dangling pointer will be produced because the temporary `Vec<u8>` will be dropped - --> $DIR/types.rs:24:26 + --> $DIR/types.rs:25:26 | LL | declval::<Vec<u8>>().as_ptr(); | -------------------- ^^^^^^ this pointer will immediately be invalid @@ -37,7 +37,7 @@ LL | declval::<Vec<u8>>().as_ptr(); = help: for more information, see <https://doc.rust-lang.org/reference/destructors.html> error: a dangling pointer will be produced because the temporary `Box<CString>` will be dropped - --> $DIR/types.rs:26:31 + --> $DIR/types.rs:27:31 | LL | declval::<Box<CString>>().as_ptr(); | ------------------------- ^^^^^^ this pointer will immediately be invalid @@ -48,7 +48,7 @@ LL | declval::<Box<CString>>().as_ptr(); = help: for more information, see <https://doc.rust-lang.org/reference/destructors.html> error: a dangling pointer will be produced because the temporary `Box<[u8]>` will be dropped - --> $DIR/types.rs:28:28 + --> $DIR/types.rs:29:28 | LL | declval::<Box<[u8]>>().as_ptr(); | ---------------------- ^^^^^^ this pointer will immediately be invalid @@ -59,7 +59,7 @@ LL | declval::<Box<[u8]>>().as_ptr(); = help: for more information, see <https://doc.rust-lang.org/reference/destructors.html> error: a dangling pointer will be produced because the temporary `Box<str>` will be dropped - --> $DIR/types.rs:30:27 + --> $DIR/types.rs:31:27 | LL | declval::<Box<str>>().as_ptr(); | --------------------- ^^^^^^ this pointer will immediately be invalid @@ -70,7 +70,7 @@ LL | declval::<Box<str>>().as_ptr(); = help: for more information, see <https://doc.rust-lang.org/reference/destructors.html> error: a dangling pointer will be produced because the temporary `Box<CStr>` will be dropped - --> $DIR/types.rs:32:28 + --> $DIR/types.rs:33:28 | LL | declval::<Box<CStr>>().as_ptr(); | ---------------------- ^^^^^^ this pointer will immediately be invalid @@ -81,7 +81,7 @@ LL | declval::<Box<CStr>>().as_ptr(); = help: for more information, see <https://doc.rust-lang.org/reference/destructors.html> error: a dangling pointer will be produced because the temporary `[u8; 10]` will be dropped - --> $DIR/types.rs:34:27 + --> $DIR/types.rs:35:27 | LL | declval::<[u8; 10]>().as_ptr(); | --------------------- ^^^^^^ this pointer will immediately be invalid @@ -92,7 +92,7 @@ LL | declval::<[u8; 10]>().as_ptr(); = help: for more information, see <https://doc.rust-lang.org/reference/destructors.html> error: a dangling pointer will be produced because the temporary `Box<[u8; 10]>` will be dropped - --> $DIR/types.rs:36:32 + --> $DIR/types.rs:37:32 | LL | declval::<Box<[u8; 10]>>().as_ptr(); | -------------------------- ^^^^^^ this pointer will immediately be invalid @@ -103,7 +103,7 @@ LL | declval::<Box<[u8; 10]>>().as_ptr(); = help: for more information, see <https://doc.rust-lang.org/reference/destructors.html> error: a dangling pointer will be produced because the temporary `Box<Vec<u8>>` will be dropped - --> $DIR/types.rs:38:31 + --> $DIR/types.rs:39:31 | LL | declval::<Box<Vec<u8>>>().as_ptr(); | ------------------------- ^^^^^^ this pointer will immediately be invalid @@ -114,7 +114,7 @@ LL | declval::<Box<Vec<u8>>>().as_ptr(); = help: for more information, see <https://doc.rust-lang.org/reference/destructors.html> error: a dangling pointer will be produced because the temporary `Box<String>` will be dropped - --> $DIR/types.rs:40:30 + --> $DIR/types.rs:41:30 | LL | declval::<Box<String>>().as_ptr(); | ------------------------ ^^^^^^ this pointer will immediately be invalid @@ -125,7 +125,7 @@ LL | declval::<Box<String>>().as_ptr(); = help: for more information, see <https://doc.rust-lang.org/reference/destructors.html> error: a dangling pointer will be produced because the temporary `Box<Box<Box<Box<[u8]>>>>` will be dropped - --> $DIR/types.rs:42:43 + --> $DIR/types.rs:43:43 | LL | declval::<Box<Box<Box<Box<[u8]>>>>>().as_ptr(); | ------------------------------------- ^^^^^^ this pointer will immediately be invalid @@ -136,7 +136,7 @@ LL | declval::<Box<Box<Box<Box<[u8]>>>>>().as_ptr(); = help: for more information, see <https://doc.rust-lang.org/reference/destructors.html> error: a dangling pointer will be produced because the temporary `Cell<u8>` will be dropped - --> $DIR/types.rs:44:27 + --> $DIR/types.rs:45:27 | LL | declval::<Cell<u8>>().as_ptr(); | --------------------- ^^^^^^ this pointer will immediately be invalid @@ -147,7 +147,7 @@ LL | declval::<Cell<u8>>().as_ptr(); = help: for more information, see <https://doc.rust-lang.org/reference/destructors.html> error: a dangling pointer will be produced because the temporary `MaybeUninit<u8>` will be dropped - --> $DIR/types.rs:46:34 + --> $DIR/types.rs:47:34 | LL | declval::<MaybeUninit<u8>>().as_ptr(); | ---------------------------- ^^^^^^ this pointer will immediately be invalid @@ -158,7 +158,7 @@ LL | declval::<MaybeUninit<u8>>().as_ptr(); = help: for more information, see <https://doc.rust-lang.org/reference/destructors.html> error: a dangling pointer will be produced because the temporary `Vec<AsPtrFake>` will be dropped - --> $DIR/types.rs:48:33 + --> $DIR/types.rs:49:33 | LL | declval::<Vec<AsPtrFake>>().as_ptr(); | --------------------------- ^^^^^^ this pointer will immediately be invalid @@ -168,5 +168,27 @@ LL | declval::<Vec<AsPtrFake>>().as_ptr(); = note: pointers do not have a lifetime; when calling `as_ptr` the `Vec<AsPtrFake>` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned = help: for more information, see <https://doc.rust-lang.org/reference/destructors.html> -error: aborting due to 15 previous errors +error: a dangling pointer will be produced because the temporary `UnsafeCell<u8>` will be dropped + --> $DIR/types.rs:51:33 + | +LL | declval::<UnsafeCell<u8>>().get(); + | --------------------------- ^^^ this pointer will immediately be invalid + | | + | this `UnsafeCell<u8>` is deallocated at the end of the statement, bind it to a variable to extend its lifetime + | + = note: pointers do not have a lifetime; when calling `get` the `UnsafeCell<u8>` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned + = help: for more information, see <https://doc.rust-lang.org/reference/destructors.html> + +error: a dangling pointer will be produced because the temporary `SyncUnsafeCell<u8>` will be dropped + --> $DIR/types.rs:53:37 + | +LL | declval::<SyncUnsafeCell<u8>>().get(); + | ------------------------------- ^^^ this pointer will immediately be invalid + | | + | this `SyncUnsafeCell<u8>` is deallocated at the end of the statement, bind it to a variable to extend its lifetime + | + = note: pointers do not have a lifetime; when calling `get` the `SyncUnsafeCell<u8>` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned + = help: for more information, see <https://doc.rust-lang.org/reference/destructors.html> + +error: aborting due to 17 previous errors diff --git a/tests/ui/lint/issue-104392.stderr b/tests/ui/lint/issue-104392.stderr index 8e466439ae6..4d8d8c56d41 100644 --- a/tests/ui/lint/issue-104392.stderr +++ b/tests/ui/lint/issue-104392.stderr @@ -6,7 +6,7 @@ LL | { unsafe 92 } | | | while parsing this `unsafe` expression | -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | { unsafe { 92 } } | + + diff --git a/tests/ui/lint/unused/issue-54538-unused-parens-lint.fixed b/tests/ui/lint/unused/issue-54538-unused-parens-lint.fixed index 7cf4aa6cdd4..ada37ccd640 100644 --- a/tests/ui/lint/unused/issue-54538-unused-parens-lint.fixed +++ b/tests/ui/lint/unused/issue-54538-unused-parens-lint.fixed @@ -10,7 +10,7 @@ unused_mut, unused_variables )] -#![deny(unused_parens)] +#![deny(unused_parens, unused_braces)] fn lint_on_top_level() { let a = 0; //~ ERROR unnecessary parentheses around pattern @@ -43,8 +43,10 @@ fn no_lint_ops() { fn lint_break_if_not_followed_by_block() { #![allow(unreachable_code)] loop { if break {} } //~ ERROR unnecessary parentheses - loop { if break ({ println!("hello") }) {} } //~ ERROR unnecessary parentheses - loop { if (break { println!("hello") }) {} } + loop { if break { println!("hello") } {} } + //~^ ERROR unnecessary parentheses around `if` condition + //~| ERROR unnecessary parentheses around `break` value + loop { if (break println!("hello")) {} } //~ ERROR unnecessary braces around `break` value } // Don't lint in these cases (#64106). diff --git a/tests/ui/lint/unused/issue-54538-unused-parens-lint.rs b/tests/ui/lint/unused/issue-54538-unused-parens-lint.rs index 013255dc213..67066c3bee3 100644 --- a/tests/ui/lint/unused/issue-54538-unused-parens-lint.rs +++ b/tests/ui/lint/unused/issue-54538-unused-parens-lint.rs @@ -10,7 +10,7 @@ unused_mut, unused_variables )] -#![deny(unused_parens)] +#![deny(unused_parens, unused_braces)] fn lint_on_top_level() { let (a) = 0; //~ ERROR unnecessary parentheses around pattern @@ -43,8 +43,10 @@ fn no_lint_ops() { fn lint_break_if_not_followed_by_block() { #![allow(unreachable_code)] loop { if (break) {} } //~ ERROR unnecessary parentheses - loop { if (break ({ println!("hello") })) {} } //~ ERROR unnecessary parentheses - loop { if (break { println!("hello") }) {} } + loop { if (break ({ println!("hello") })) {} } + //~^ ERROR unnecessary parentheses around `if` condition + //~| ERROR unnecessary parentheses around `break` value + loop { if (break { println!("hello") }) {} } //~ ERROR unnecessary braces around `break` value } // Don't lint in these cases (#64106). diff --git a/tests/ui/lint/unused/issue-54538-unused-parens-lint.stderr b/tests/ui/lint/unused/issue-54538-unused-parens-lint.stderr index f916bba8194..d5fdaef42d8 100644 --- a/tests/ui/lint/unused/issue-54538-unused-parens-lint.stderr +++ b/tests/ui/lint/unused/issue-54538-unused-parens-lint.stderr @@ -7,7 +7,7 @@ LL | let (a) = 0; note: the lint level is defined here --> $DIR/issue-54538-unused-parens-lint.rs:13:9 | -LL | #![deny(unused_parens)] +LL | #![deny(unused_parens, unused_braces)] | ^^^^^^^^^^^^^ help: remove these parentheses | @@ -99,8 +99,37 @@ LL - loop { if (break ({ println!("hello") })) {} } LL + loop { if break ({ println!("hello") }) {} } | +error: unnecessary parentheses around `break` value + --> $DIR/issue-54538-unused-parens-lint.rs:46:22 + | +LL | loop { if (break ({ println!("hello") })) {} } + | ^ ^ + | +help: remove these parentheses + | +LL - loop { if (break ({ println!("hello") })) {} } +LL + loop { if (break { println!("hello") }) {} } + | + +error: unnecessary braces around `break` value + --> $DIR/issue-54538-unused-parens-lint.rs:49:22 + | +LL | loop { if (break { println!("hello") }) {} } + | ^^ ^^ + | +note: the lint level is defined here + --> $DIR/issue-54538-unused-parens-lint.rs:13:24 + | +LL | #![deny(unused_parens, unused_braces)] + | ^^^^^^^^^^^^^ +help: remove these braces + | +LL - loop { if (break { println!("hello") }) {} } +LL + loop { if (break println!("hello")) {} } + | + error: unnecessary parentheses around pattern - --> $DIR/issue-54538-unused-parens-lint.rs:71:12 + --> $DIR/issue-54538-unused-parens-lint.rs:73:12 | LL | if let (0 | 1) = 0 {} | ^ ^ @@ -112,7 +141,7 @@ LL + if let 0 | 1 = 0 {} | error: unnecessary parentheses around pattern - --> $DIR/issue-54538-unused-parens-lint.rs:72:13 + --> $DIR/issue-54538-unused-parens-lint.rs:74:13 | LL | if let ((0 | 1),) = (0,) {} | ^ ^ @@ -124,7 +153,7 @@ LL + if let (0 | 1,) = (0,) {} | error: unnecessary parentheses around pattern - --> $DIR/issue-54538-unused-parens-lint.rs:73:13 + --> $DIR/issue-54538-unused-parens-lint.rs:75:13 | LL | if let [(0 | 1)] = [0] {} | ^ ^ @@ -136,7 +165,7 @@ LL + if let [0 | 1] = [0] {} | error: unnecessary parentheses around pattern - --> $DIR/issue-54538-unused-parens-lint.rs:74:16 + --> $DIR/issue-54538-unused-parens-lint.rs:76:16 | LL | if let 0 | (1 | 2) = 0 {} | ^ ^ @@ -148,7 +177,7 @@ LL + if let 0 | 1 | 2 = 0 {} | error: unnecessary parentheses around pattern - --> $DIR/issue-54538-unused-parens-lint.rs:76:15 + --> $DIR/issue-54538-unused-parens-lint.rs:78:15 | LL | if let TS((0 | 1)) = TS(0) {} | ^ ^ @@ -160,7 +189,7 @@ LL + if let TS(0 | 1) = TS(0) {} | error: unnecessary parentheses around pattern - --> $DIR/issue-54538-unused-parens-lint.rs:78:20 + --> $DIR/issue-54538-unused-parens-lint.rs:80:20 | LL | if let NS { f: (0 | 1) } = (NS { f: 0 }) {} | ^ ^ @@ -172,7 +201,7 @@ LL + if let NS { f: 0 | 1 } = (NS { f: 0 }) {} | error: unnecessary parentheses around pattern - --> $DIR/issue-54538-unused-parens-lint.rs:88:9 + --> $DIR/issue-54538-unused-parens-lint.rs:90:9 | LL | (_) => {} | ^ ^ @@ -184,7 +213,7 @@ LL + _ => {} | error: unnecessary parentheses around pattern - --> $DIR/issue-54538-unused-parens-lint.rs:89:9 + --> $DIR/issue-54538-unused-parens-lint.rs:91:9 | LL | (y) => {} | ^ ^ @@ -196,7 +225,7 @@ LL + y => {} | error: unnecessary parentheses around pattern - --> $DIR/issue-54538-unused-parens-lint.rs:90:9 + --> $DIR/issue-54538-unused-parens-lint.rs:92:9 | LL | (ref r) => {} | ^ ^ @@ -208,7 +237,7 @@ LL + ref r => {} | error: unnecessary parentheses around pattern - --> $DIR/issue-54538-unused-parens-lint.rs:91:9 + --> $DIR/issue-54538-unused-parens-lint.rs:93:9 | LL | (e @ 1...2) => {} | ^ ^ @@ -220,7 +249,7 @@ LL + e @ 1...2 => {} | error: unnecessary parentheses around pattern - --> $DIR/issue-54538-unused-parens-lint.rs:97:9 + --> $DIR/issue-54538-unused-parens-lint.rs:99:9 | LL | (e @ &(1...2)) => {} | ^ ^ @@ -232,7 +261,7 @@ LL + e @ &(1...2) => {} | error: unnecessary parentheses around pattern - --> $DIR/issue-54538-unused-parens-lint.rs:98:10 + --> $DIR/issue-54538-unused-parens-lint.rs:100:10 | LL | &(_) => {} | ^ ^ @@ -244,7 +273,7 @@ LL + &_ => {} | error: unnecessary parentheses around pattern - --> $DIR/issue-54538-unused-parens-lint.rs:109:9 + --> $DIR/issue-54538-unused-parens-lint.rs:111:9 | LL | (_) => {} | ^ ^ @@ -256,7 +285,7 @@ LL + _ => {} | error: unnecessary parentheses around pattern - --> $DIR/issue-54538-unused-parens-lint.rs:110:9 + --> $DIR/issue-54538-unused-parens-lint.rs:112:9 | LL | (y) => {} | ^ ^ @@ -268,7 +297,7 @@ LL + y => {} | error: unnecessary parentheses around pattern - --> $DIR/issue-54538-unused-parens-lint.rs:111:9 + --> $DIR/issue-54538-unused-parens-lint.rs:113:9 | LL | (ref r) => {} | ^ ^ @@ -280,7 +309,7 @@ LL + ref r => {} | error: unnecessary parentheses around pattern - --> $DIR/issue-54538-unused-parens-lint.rs:112:9 + --> $DIR/issue-54538-unused-parens-lint.rs:114:9 | LL | (e @ 1..=2) => {} | ^ ^ @@ -292,7 +321,7 @@ LL + e @ 1..=2 => {} | error: unnecessary parentheses around pattern - --> $DIR/issue-54538-unused-parens-lint.rs:118:9 + --> $DIR/issue-54538-unused-parens-lint.rs:120:9 | LL | (e @ &(1..=2)) => {} | ^ ^ @@ -304,7 +333,7 @@ LL + e @ &(1..=2) => {} | error: unnecessary parentheses around pattern - --> $DIR/issue-54538-unused-parens-lint.rs:119:10 + --> $DIR/issue-54538-unused-parens-lint.rs:121:10 | LL | &(_) => {} | ^ ^ @@ -315,5 +344,5 @@ LL - &(_) => {} LL + &_ => {} | -error: aborting due to 26 previous errors +error: aborting due to 28 previous errors diff --git a/tests/ui/lint/unused/unused-parens-assign-expr-in-ret-issue-131989.fixed b/tests/ui/lint/unused/unused-parens-assign-expr-in-ret-issue-131989.fixed new file mode 100644 index 00000000000..9343d906cdc --- /dev/null +++ b/tests/ui/lint/unused/unused-parens-assign-expr-in-ret-issue-131989.fixed @@ -0,0 +1,32 @@ +//@ run-rustfix +#![deny(unused_parens)] +#![allow(unreachable_code)] + +fn foo() { + loop { + break (_ = 42); + // lint unused_parens should not be triggered here. + } + + let _ = loop { + let a = 1; + let b = 2; + break a + b; //~ERROR unnecessary parentheses + }; + + loop { + if break return () { + //~^ ERROR unnecessary parentheses + } + if break return () { + //~^ ERROR unnecessary parentheses + } + } + + return (_ = 42); + // lint unused_parens should not be triggered here. +} + +fn main() { + let _ = foo(); +} diff --git a/tests/ui/lint/unused/unused-parens-assign-expr-in-ret-issue-131989.rs b/tests/ui/lint/unused/unused-parens-assign-expr-in-ret-issue-131989.rs new file mode 100644 index 00000000000..fe9cba3e168 --- /dev/null +++ b/tests/ui/lint/unused/unused-parens-assign-expr-in-ret-issue-131989.rs @@ -0,0 +1,32 @@ +//@ run-rustfix +#![deny(unused_parens)] +#![allow(unreachable_code)] + +fn foo() { + loop { + break (_ = 42); + // lint unused_parens should not be triggered here. + } + + let _ = loop { + let a = 1; + let b = 2; + break (a + b); //~ERROR unnecessary parentheses + }; + + loop { + if (break return ()) { + //~^ ERROR unnecessary parentheses + } + if break (return ()) { + //~^ ERROR unnecessary parentheses + } + } + + return (_ = 42); + // lint unused_parens should not be triggered here. +} + +fn main() { + let _ = foo(); +} diff --git a/tests/ui/lint/unused/unused-parens-assign-expr-in-ret-issue-131989.stderr b/tests/ui/lint/unused/unused-parens-assign-expr-in-ret-issue-131989.stderr new file mode 100644 index 00000000000..c41cf32bade --- /dev/null +++ b/tests/ui/lint/unused/unused-parens-assign-expr-in-ret-issue-131989.stderr @@ -0,0 +1,43 @@ +error: unnecessary parentheses around `break` value + --> $DIR/unused-parens-assign-expr-in-ret-issue-131989.rs:14:15 + | +LL | break (a + b); + | ^ ^ + | +note: the lint level is defined here + --> $DIR/unused-parens-assign-expr-in-ret-issue-131989.rs:2:9 + | +LL | #![deny(unused_parens)] + | ^^^^^^^^^^^^^ +help: remove these parentheses + | +LL - break (a + b); +LL + break a + b; + | + +error: unnecessary parentheses around `if` condition + --> $DIR/unused-parens-assign-expr-in-ret-issue-131989.rs:18:12 + | +LL | if (break return ()) { + | ^ ^ + | +help: remove these parentheses + | +LL - if (break return ()) { +LL + if break return () { + | + +error: unnecessary parentheses around `break` value + --> $DIR/unused-parens-assign-expr-in-ret-issue-131989.rs:21:18 + | +LL | if break (return ()) { + | ^ ^ + | +help: remove these parentheses + | +LL - if break (return ()) { +LL + if break return () { + | + +error: aborting due to 3 previous errors + diff --git a/tests/ui/lint/unused_parens_json_suggestion.fixed b/tests/ui/lint/unused_parens_json_suggestion.fixed index 89fd0d86614..f26bedc3fd5 100644 --- a/tests/ui/lint/unused_parens_json_suggestion.fixed +++ b/tests/ui/lint/unused_parens_json_suggestion.fixed @@ -9,7 +9,7 @@ // test of the JSON error format. #![deny(unused_parens)] -#![allow(unreachable_code)] +#![allow(unreachable_code, unused_braces)] fn main() { // We want to suggest the properly-balanced expression `1 / (2 + 3)`, not diff --git a/tests/ui/lint/unused_parens_json_suggestion.rs b/tests/ui/lint/unused_parens_json_suggestion.rs index 4526084196c..af3d88f71bb 100644 --- a/tests/ui/lint/unused_parens_json_suggestion.rs +++ b/tests/ui/lint/unused_parens_json_suggestion.rs @@ -9,7 +9,7 @@ // test of the JSON error format. #![deny(unused_parens)] -#![allow(unreachable_code)] +#![allow(unreachable_code, unused_braces)] fn main() { // We want to suggest the properly-balanced expression `1 / (2 + 3)`, not diff --git a/tests/ui/lint/unused_parens_json_suggestion.stderr b/tests/ui/lint/unused_parens_json_suggestion.stderr index 1f4928cd464..2ce31817d29 100644 --- a/tests/ui/lint/unused_parens_json_suggestion.stderr +++ b/tests/ui/lint/unused_parens_json_suggestion.stderr @@ -1,4 +1,4 @@ -{"$message_type":"diagnostic","message":"unnecessary parentheses around assigned value","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":633,"byte_end":634,"line_start":17,"line_end":17,"column_start":26,"column_end":27,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":26,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":439,"byte_end":452,"line_start":11,"line_end":11,"column_start":9,"column_end":22,"is_primary":true,"text":[{"text":"#![deny(unused_parens)]","highlight_start":9,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":633,"byte_end":634,"line_start":17,"line_end":17,"column_start":26,"column_end":27,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":26,"highlight_end":27}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around assigned value +{"$message_type":"diagnostic","message":"unnecessary parentheses around assigned value","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":636,"byte_end":637,"line_start":17,"line_end":17,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":648,"byte_end":649,"line_start":17,"line_end":17,"column_start":26,"column_end":27,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":26,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":439,"byte_end":452,"line_start":11,"line_end":11,"column_start":9,"column_end":22,"is_primary":true,"text":[{"text":"#![deny(unused_parens)]","highlight_start":9,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":636,"byte_end":637,"line_start":17,"line_end":17,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":648,"byte_end":649,"line_start":17,"line_end":17,"column_start":26,"column_end":27,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":26,"highlight_end":27}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around assigned value --> $DIR/unused_parens_json_suggestion.rs:17:14 | LL | let _a = (1 / (2 + 3)); diff --git a/tests/ui/lint/unused_parens_remove_json_suggestion.fixed b/tests/ui/lint/unused_parens_remove_json_suggestion.fixed index e2774d5d7e5..899c24f83ed 100644 --- a/tests/ui/lint/unused_parens_remove_json_suggestion.fixed +++ b/tests/ui/lint/unused_parens_remove_json_suggestion.fixed @@ -9,7 +9,7 @@ // test of the JSON error format. #![deny(unused_parens)] -#![allow(unreachable_code)] +#![allow(unreachable_code, unused_braces)] fn main() { diff --git a/tests/ui/lint/unused_parens_remove_json_suggestion.rs b/tests/ui/lint/unused_parens_remove_json_suggestion.rs index b3ac87178db..7f5d935c4ac 100644 --- a/tests/ui/lint/unused_parens_remove_json_suggestion.rs +++ b/tests/ui/lint/unused_parens_remove_json_suggestion.rs @@ -9,7 +9,7 @@ // test of the JSON error format. #![deny(unused_parens)] -#![allow(unreachable_code)] +#![allow(unreachable_code, unused_braces)] fn main() { diff --git a/tests/ui/lint/unused_parens_remove_json_suggestion.stderr b/tests/ui/lint/unused_parens_remove_json_suggestion.stderr index 9268fc1abc4..975de4edfdf 100644 --- a/tests/ui/lint/unused_parens_remove_json_suggestion.stderr +++ b/tests/ui/lint/unused_parens_remove_json_suggestion.stderr @@ -1,4 +1,4 @@ -{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":525,"byte_end":526,"line_start":18,"line_end":18,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":528,"byte_end":529,"line_start":18,"line_end":18,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":439,"byte_end":452,"line_start":11,"line_end":11,"column_start":9,"column_end":22,"is_primary":true,"text":[{"text":"#![deny(unused_parens)]","highlight_start":9,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":525,"byte_end":526,"line_start":18,"line_end":18,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":528,"byte_end":529,"line_start":18,"line_end":18,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":540,"byte_end":541,"line_start":18,"line_end":18,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":543,"byte_end":544,"line_start":18,"line_end":18,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":439,"byte_end":452,"line_start":11,"line_end":11,"column_start":9,"column_end":22,"is_primary":true,"text":[{"text":"#![deny(unused_parens)]","highlight_start":9,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":540,"byte_end":541,"line_start":18,"line_end":18,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":543,"byte_end":544,"line_start":18,"line_end":18,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition --> $DIR/unused_parens_remove_json_suggestion.rs:18:8 | LL | if (_b) { @@ -16,7 +16,7 @@ LL + if _b { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":622,"byte_end":623,"line_start":29,"line_end":29,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":7,"highlight_end":8}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":624,"byte_end":625,"line_start":29,"line_end":29,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":622,"byte_end":623,"line_start":29,"line_end":29,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":7,"highlight_end":8}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":624,"byte_end":625,"line_start":29,"line_end":29,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":637,"byte_end":638,"line_start":29,"line_end":29,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":7,"highlight_end":8}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":639,"byte_end":640,"line_start":29,"line_end":29,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":637,"byte_end":638,"line_start":29,"line_end":29,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":7,"highlight_end":8}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":639,"byte_end":640,"line_start":29,"line_end":29,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition --> $DIR/unused_parens_remove_json_suggestion.rs:29:7 | LL | if(c) { @@ -29,7 +29,7 @@ LL + if c { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":668,"byte_end":669,"line_start":33,"line_end":33,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (c){","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":670,"byte_end":671,"line_start":33,"line_end":33,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" if (c){","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":668,"byte_end":669,"line_start":33,"line_end":33,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (c){","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":670,"byte_end":671,"line_start":33,"line_end":33,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" if (c){","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":683,"byte_end":684,"line_start":33,"line_end":33,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (c){","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":685,"byte_end":686,"line_start":33,"line_end":33,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" if (c){","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":683,"byte_end":684,"line_start":33,"line_end":33,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (c){","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":685,"byte_end":686,"line_start":33,"line_end":33,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" if (c){","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition --> $DIR/unused_parens_remove_json_suggestion.rs:33:8 | LL | if (c){ @@ -42,7 +42,7 @@ LL + if c { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":716,"byte_end":717,"line_start":37,"line_end":37,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":730,"byte_end":731,"line_start":37,"line_end":37,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":716,"byte_end":717,"line_start":37,"line_end":37,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":730,"byte_end":731,"line_start":37,"line_end":37,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":731,"byte_end":732,"line_start":37,"line_end":37,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":745,"byte_end":746,"line_start":37,"line_end":37,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":731,"byte_end":732,"line_start":37,"line_end":37,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":745,"byte_end":746,"line_start":37,"line_end":37,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition --> $DIR/unused_parens_remove_json_suggestion.rs:37:11 | LL | while (false && true){ @@ -55,7 +55,7 @@ LL + while false && true { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":744,"byte_end":745,"line_start":38,"line_end":38,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":12,"highlight_end":13}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":746,"byte_end":747,"line_start":38,"line_end":38,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":744,"byte_end":745,"line_start":38,"line_end":38,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":12,"highlight_end":13}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":746,"byte_end":747,"line_start":38,"line_end":38,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":759,"byte_end":760,"line_start":38,"line_end":38,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":12,"highlight_end":13}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":761,"byte_end":762,"line_start":38,"line_end":38,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":759,"byte_end":760,"line_start":38,"line_end":38,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":12,"highlight_end":13}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":761,"byte_end":762,"line_start":38,"line_end":38,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition --> $DIR/unused_parens_remove_json_suggestion.rs:38:12 | LL | if (c) { @@ -68,7 +68,7 @@ LL + if c { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":807,"byte_end":808,"line_start":44,"line_end":44,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":821,"byte_end":822,"line_start":44,"line_end":44,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":24,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":807,"byte_end":808,"line_start":44,"line_end":44,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":821,"byte_end":822,"line_start":44,"line_end":44,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":24,"highlight_end":25}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":822,"byte_end":823,"line_start":44,"line_end":44,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":836,"byte_end":837,"line_start":44,"line_end":44,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":24,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":822,"byte_end":823,"line_start":44,"line_end":44,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":836,"byte_end":837,"line_start":44,"line_end":44,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":24,"highlight_end":25}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition --> $DIR/unused_parens_remove_json_suggestion.rs:44:10 | LL | while(true && false) { @@ -81,7 +81,7 @@ LL + while true && false { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":842,"byte_end":843,"line_start":45,"line_end":45,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":18,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":849,"byte_end":850,"line_start":45,"line_end":45,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":842,"byte_end":843,"line_start":45,"line_end":45,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":18,"highlight_end":19}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":849,"byte_end":850,"line_start":45,"line_end":45,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `for` iterator expression +{"$message_type":"diagnostic","message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":857,"byte_end":858,"line_start":45,"line_end":45,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":18,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":864,"byte_end":865,"line_start":45,"line_end":45,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":857,"byte_end":858,"line_start":45,"line_end":45,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":18,"highlight_end":19}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":864,"byte_end":865,"line_start":45,"line_end":45,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `for` iterator expression --> $DIR/unused_parens_remove_json_suggestion.rs:45:18 | LL | for _ in (0 .. 3){ @@ -94,7 +94,7 @@ LL + for _ in 0 .. 3 { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":909,"byte_end":910,"line_start":50,"line_end":50,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":916,"byte_end":917,"line_start":50,"line_end":50,"column_start":21,"column_end":22,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":21,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":909,"byte_end":910,"line_start":50,"line_end":50,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":916,"byte_end":917,"line_start":50,"line_end":50,"column_start":21,"column_end":22,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":21,"highlight_end":22}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `for` iterator expression +{"$message_type":"diagnostic","message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":924,"byte_end":925,"line_start":50,"line_end":50,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":931,"byte_end":932,"line_start":50,"line_end":50,"column_start":21,"column_end":22,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":21,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":924,"byte_end":925,"line_start":50,"line_end":50,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":931,"byte_end":932,"line_start":50,"line_end":50,"column_start":21,"column_end":22,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":21,"highlight_end":22}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `for` iterator expression --> $DIR/unused_parens_remove_json_suggestion.rs:50:14 | LL | for _ in (0 .. 3) { @@ -107,7 +107,7 @@ LL + for _ in 0 .. 3 { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":934,"byte_end":935,"line_start":51,"line_end":51,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":15,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":948,"byte_end":949,"line_start":51,"line_end":51,"column_start":29,"column_end":30,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":29,"highlight_end":30}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":934,"byte_end":935,"line_start":51,"line_end":51,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":15,"highlight_end":16}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":948,"byte_end":949,"line_start":51,"line_end":51,"column_start":29,"column_end":30,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":29,"highlight_end":30}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":949,"byte_end":950,"line_start":51,"line_end":51,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":15,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":963,"byte_end":964,"line_start":51,"line_end":51,"column_start":29,"column_end":30,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":29,"highlight_end":30}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":949,"byte_end":950,"line_start":51,"line_end":51,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":15,"highlight_end":16}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":963,"byte_end":964,"line_start":51,"line_end":51,"column_start":29,"column_end":30,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":29,"highlight_end":30}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition --> $DIR/unused_parens_remove_json_suggestion.rs:51:15 | LL | while (true && false) { diff --git a/tests/ui/match/intended-binding-pattern-is-const.rs b/tests/ui/match/intended-binding-pattern-is-const.rs new file mode 100644 index 00000000000..95c8119cdb9 --- /dev/null +++ b/tests/ui/match/intended-binding-pattern-is-const.rs @@ -0,0 +1,10 @@ +fn main() { + match 1 { //~ ERROR non-exhaustive patterns + //~^ patterns `i32::MIN..=3_i32` and `5_i32..=i32::MAX` not covered + //~| the matched value is of type `i32` + x => {} //~ this pattern doesn't introduce a new catch-all binding + //~^ HELP ensure that all possible cases are being handled + //~| HELP if you meant to introduce a binding, use a different name + } + const x: i32 = 4; //~ NOTE constant `x` defined here +} diff --git a/tests/ui/match/intended-binding-pattern-is-const.stderr b/tests/ui/match/intended-binding-pattern-is-const.stderr new file mode 100644 index 00000000000..99af1c7a16e --- /dev/null +++ b/tests/ui/match/intended-binding-pattern-is-const.stderr @@ -0,0 +1,27 @@ +error[E0004]: non-exhaustive patterns: `i32::MIN..=3_i32` and `5_i32..=i32::MAX` not covered + --> $DIR/intended-binding-pattern-is-const.rs:2:11 + | +LL | match 1 { + | ^ patterns `i32::MIN..=3_i32` and `5_i32..=i32::MAX` not covered +... +LL | x => {} + | - this pattern doesn't introduce a new catch-all binding, but rather pattern matches against the value of constant `x` + | + = note: the matched value is of type `i32` +note: constant `x` defined here + --> $DIR/intended-binding-pattern-is-const.rs:9:5 + | +LL | const x: i32 = 4; + | ^^^^^^^^^^^^ +help: if you meant to introduce a binding, use a different name + | +LL | x_var => {} + | ++++ +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms + | +LL | x => {}, i32::MIN..=3_i32 | 5_i32..=i32::MAX => todo!() + | ++++++++++++++++++++++++++++++++++++++++++++++++ + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0004`. diff --git a/tests/ui/mir/issue-112269.stderr b/tests/ui/mir/issue-112269.stderr index f5b79602797..adb662c98a7 100644 --- a/tests/ui/mir/issue-112269.stderr +++ b/tests/ui/mir/issue-112269.stderr @@ -1,30 +1,34 @@ error[E0005]: refutable pattern in local binding --> $DIR/issue-112269.rs:3:9 | +LL | const x: i32 = 4; + | ------------ missing patterns are not covered because `x` is interpreted as a constant pattern, not a new variable LL | let x: i32 = 3; - | ^ - | | - | patterns `i32::MIN..=3_i32` and `5_i32..=i32::MAX` not covered - | missing patterns are not covered because `x` is interpreted as a constant pattern, not a new variable - | help: introduce a variable instead: `x_var` + | ^ patterns `i32::MIN..=3_i32` and `5_i32..=i32::MAX` not covered | = 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: the matched value is of type `i32` +help: introduce a variable instead + | +LL | let x_var: i32 = 3; + | ~~~~~ error[E0005]: refutable pattern in local binding --> $DIR/issue-112269.rs:7:9 | +LL | const y: i32 = 3; + | ------------ missing patterns are not covered because `y` is interpreted as a constant pattern, not a new variable LL | let y = 4; - | ^ - | | - | patterns `i32::MIN..=2_i32` and `4_i32..=i32::MAX` not covered - | missing patterns are not covered because `y` is interpreted as a constant pattern, not a new variable - | help: introduce a variable instead: `y_var` + | ^ patterns `i32::MIN..=2_i32` and `4_i32..=i32::MAX` not covered | = 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: the matched value is of type `i32` +help: introduce a variable instead + | +LL | let y_var = 4; + | ~~~~~ error: aborting due to 2 previous errors diff --git a/tests/ui/missing/missing-block-hint.stderr b/tests/ui/missing/missing-block-hint.stderr index 18719289abd..7a08d70d0ce 100644 --- a/tests/ui/missing/missing-block-hint.stderr +++ b/tests/ui/missing/missing-block-hint.stderr @@ -25,7 +25,7 @@ note: the `if` expression is missing a block after this condition | LL | if (foo) | ^^^^^ -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | { bar; } | + + diff --git a/tests/ui/moves/auxiliary/suggest-borrow-for-generic-arg-aux.rs b/tests/ui/moves/auxiliary/suggest-borrow-for-generic-arg-aux.rs new file mode 100644 index 00000000000..c71238ba072 --- /dev/null +++ b/tests/ui/moves/auxiliary/suggest-borrow-for-generic-arg-aux.rs @@ -0,0 +1,20 @@ +//! auxiliary definitons for suggest-borrow-for-generic-arg.rs, to ensure the suggestion works on +//! functions defined in other crates. + +use std::io::{self, Read, Write}; +use std::iter::Sum; + +pub fn write_stuff<W: Write>(mut writer: W) -> io::Result<()> { + writeln!(writer, "stuff") +} + +pub fn read_and_discard<R: Read>(mut reader: R) -> io::Result<()> { + let mut buf = Vec::new(); + reader.read_to_end(&mut buf).map(|_| ()) +} + +pub fn sum_three<I: IntoIterator>(iter: I) -> <I as IntoIterator>::Item + where <I as IntoIterator>::Item: Sum +{ + iter.into_iter().take(3).sum() +} diff --git a/tests/ui/moves/borrow-closures-instead-of-move.rs b/tests/ui/moves/borrow-closures-instead-of-move.rs index e4bca54e995..869aa654ef7 100644 --- a/tests/ui/moves/borrow-closures-instead-of-move.rs +++ b/tests/ui/moves/borrow-closures-instead-of-move.rs @@ -1,4 +1,4 @@ -fn takes_fn(f: impl Fn()) { //~ HELP if `impl Fn()` implemented `Clone` +fn takes_fn(f: impl Fn()) { loop { takes_fnonce(f); //~^ ERROR use of moved value diff --git a/tests/ui/moves/borrow-closures-instead-of-move.stderr b/tests/ui/moves/borrow-closures-instead-of-move.stderr index ab6ff417efb..ea145f365c2 100644 --- a/tests/ui/moves/borrow-closures-instead-of-move.stderr +++ b/tests/ui/moves/borrow-closures-instead-of-move.stderr @@ -8,21 +8,6 @@ LL | loop { LL | takes_fnonce(f); | ^ value moved here, in previous iteration of loop | -note: consider changing this parameter type in function `takes_fnonce` to borrow instead if owning the value isn't necessary - --> $DIR/borrow-closures-instead-of-move.rs:34:20 - | -LL | fn takes_fnonce(_: impl FnOnce()) {} - | ------------ ^^^^^^^^^^^^^ this parameter takes ownership of the value - | | - | in this function -help: if `impl Fn()` implemented `Clone`, you could clone the value - --> $DIR/borrow-closures-instead-of-move.rs:1:16 - | -LL | fn takes_fn(f: impl Fn()) { - | ^^^^^^^^^ consider constraining this type parameter with `Clone` -LL | loop { -LL | takes_fnonce(f); - | - you could clone this value help: consider borrowing `f` | LL | takes_fnonce(&f); @@ -40,13 +25,6 @@ LL | takes_fnonce(m); LL | takes_fnonce(m); | ^ value used here after move | -note: consider changing this parameter type in function `takes_fnonce` to borrow instead if owning the value isn't necessary - --> $DIR/borrow-closures-instead-of-move.rs:34:20 - | -LL | fn takes_fnonce(_: impl FnOnce()) {} - | ------------ ^^^^^^^^^^^^^ this parameter takes ownership of the value - | | - | in this function help: if `impl FnMut()` implemented `Clone`, you could clone the value --> $DIR/borrow-closures-instead-of-move.rs:9:20 | diff --git a/tests/ui/moves/moved-value-on-as-ref-arg.fixed b/tests/ui/moves/moved-value-on-as-ref-arg.fixed index 292fa98a3f7..97bfe094ce5 100644 --- a/tests/ui/moves/moved-value-on-as-ref-arg.fixed +++ b/tests/ui/moves/moved-value-on-as-ref-arg.fixed @@ -18,8 +18,8 @@ impl AsMut<Bar> for Bar { fn foo<T: AsRef<Bar>>(_: T) {} fn qux<T: AsMut<Bar>>(_: T) {} -fn bat<T: Borrow<T>>(_: T) {} -fn baz<T: BorrowMut<T>>(_: T) {} +fn bat<T: Borrow<Bar>>(_: T) {} +fn baz<T: BorrowMut<Bar>>(_: T) {} pub fn main() { let bar = Bar; diff --git a/tests/ui/moves/moved-value-on-as-ref-arg.rs b/tests/ui/moves/moved-value-on-as-ref-arg.rs index 632af9efcda..fed41cf710d 100644 --- a/tests/ui/moves/moved-value-on-as-ref-arg.rs +++ b/tests/ui/moves/moved-value-on-as-ref-arg.rs @@ -18,8 +18,8 @@ impl AsMut<Bar> for Bar { fn foo<T: AsRef<Bar>>(_: T) {} fn qux<T: AsMut<Bar>>(_: T) {} -fn bat<T: Borrow<T>>(_: T) {} -fn baz<T: BorrowMut<T>>(_: T) {} +fn bat<T: Borrow<Bar>>(_: T) {} +fn baz<T: BorrowMut<Bar>>(_: T) {} pub fn main() { let bar = Bar; diff --git a/tests/ui/moves/moved-value-on-as-ref-arg.stderr b/tests/ui/moves/moved-value-on-as-ref-arg.stderr index 4004b7a43bc..a99bdb4fe9d 100644 --- a/tests/ui/moves/moved-value-on-as-ref-arg.stderr +++ b/tests/ui/moves/moved-value-on-as-ref-arg.stderr @@ -8,7 +8,7 @@ LL | foo(bar); LL | let _baa = bar; | ^^^ value used here after move | -help: borrow the value to avoid moving it +help: consider borrowing `bar` | LL | foo(&bar); | + @@ -31,7 +31,7 @@ LL | struct Bar; ... LL | qux(bar); | --- you could clone this value -help: borrow the value to avoid moving it +help: consider mutably borrowing `bar` | LL | qux(&mut bar); | ++++ @@ -46,7 +46,7 @@ LL | bat(bar); LL | let _baa = bar; | ^^^ value used here after move | -help: borrow the value to avoid moving it +help: consider borrowing `bar` | LL | bat(&bar); | + @@ -69,7 +69,7 @@ LL | struct Bar; ... LL | baz(bar); | --- you could clone this value -help: borrow the value to avoid moving it +help: consider mutably borrowing `bar` | LL | baz(&mut bar); | ++++ diff --git a/tests/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr b/tests/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr index a8473bb8198..a4c8401ce57 100644 --- a/tests/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr +++ b/tests/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr @@ -24,10 +24,6 @@ LL | fn conspirator<F>(mut f: F) where F: FnMut(&mut R, bool) { | ^ consider constraining this type parameter with `Clone` LL | let mut r = R {c: Box::new(f)}; | - you could clone this value -help: consider mutably borrowing `f` - | -LL | let mut r = R {c: Box::new(&mut f)}; - | ++++ error: aborting due to 2 previous errors diff --git a/tests/ui/moves/region-var-in-moved-ty-issue-133118.rs b/tests/ui/moves/region-var-in-moved-ty-issue-133118.rs new file mode 100644 index 00000000000..a49370e315d --- /dev/null +++ b/tests/ui/moves/region-var-in-moved-ty-issue-133118.rs @@ -0,0 +1,25 @@ +//! regression test for #133118 + +pub trait Alpha { + fn y(self) -> usize; +} + +pub trait Beta { + type Gamma; + fn gamma(&self) -> Self::Gamma; +} + +pub fn a<T: Alpha>(_x: T) -> usize { + todo!(); +} + +pub fn x<B>(beta: &B) -> usize +where + for<'a> &'a B: Beta, + for<'a> <&'a B as Beta>::Gamma: Alpha, +{ + let g1 = beta.gamma(); + a(g1) + a(g1) //~ ERROR use of moved value: `g1` [E0382] +} + +pub fn main() {} diff --git a/tests/ui/moves/region-var-in-moved-ty-issue-133118.stderr b/tests/ui/moves/region-var-in-moved-ty-issue-133118.stderr new file mode 100644 index 00000000000..691625d042d --- /dev/null +++ b/tests/ui/moves/region-var-in-moved-ty-issue-133118.stderr @@ -0,0 +1,21 @@ +error[E0382]: use of moved value: `g1` + --> $DIR/region-var-in-moved-ty-issue-133118.rs:22:15 + | +LL | let g1 = beta.gamma(); + | -- move occurs because `g1` has type `<&B as Beta>::Gamma`, which does not implement the `Copy` trait +LL | a(g1) + a(g1) + | -- ^^ value used here after move + | | + | value moved here + | +note: consider changing this parameter type in function `a` to borrow instead if owning the value isn't necessary + --> $DIR/region-var-in-moved-ty-issue-133118.rs:12:24 + | +LL | pub fn a<T: Alpha>(_x: T) -> usize { + | - ^ this parameter takes ownership of the value + | | + | in this function + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0382`. diff --git a/tests/ui/moves/suggest-borrow-for-generic-arg.fixed b/tests/ui/moves/suggest-borrow-for-generic-arg.fixed new file mode 100644 index 00000000000..b5e0b468aa6 --- /dev/null +++ b/tests/ui/moves/suggest-borrow-for-generic-arg.fixed @@ -0,0 +1,46 @@ +//! Test suggetions to borrow generic arguments instead of moving. Tests for other instances of this +//! can be found in `moved-value-on-as-ref-arg.rs` and `borrow-closures-instead-of-move.rs` +//@ run-rustfix +//@ aux-crate:aux=suggest-borrow-for-generic-arg-aux.rs +//@ edition: 2021 + +#![allow(unused_mut)] +use std::io::{self, Write}; + +// test for `std::io::Write` (#131413) +fn test_write() -> io::Result<()> { + let mut stdout = io::stdout(); + aux::write_stuff(&stdout)?; //~ HELP consider borrowing `stdout` + writeln!(stdout, "second line")?; //~ ERROR borrow of moved value: `stdout` + + let mut buf = Vec::new(); + aux::write_stuff(&mut buf.clone())?; //~ HELP consider mutably borrowing `buf` + //~^ HELP consider cloning the value + writeln!(buf, "second_line") //~ ERROR borrow of moved value: `buf` +} + +/// test for `std::io::Read` (#131413) +fn test_read() -> io::Result<()> { + let stdin = io::stdin(); + aux::read_and_discard(&stdin)?; //~ HELP consider borrowing `stdin` + aux::read_and_discard(stdin)?; //~ ERROR use of moved value: `stdin` + + let mut bytes = std::collections::VecDeque::from([1, 2, 3, 4, 5, 6]); + aux::read_and_discard(&mut bytes.clone())?; //~ HELP consider mutably borrowing `bytes` + //~^ HELP consider cloning the value + aux::read_and_discard(bytes) //~ ERROR use of moved value: `bytes` +} + +/// test that suggestions work with projection types in the callee's signature +fn test_projections() { + let mut iter = [1, 2, 3, 4, 5, 6].into_iter(); + let _six: usize = aux::sum_three(&mut iter.clone()); //~ HELP consider mutably borrowing `iter` + //~^ HELP consider cloning the value + let _fifteen: usize = aux::sum_three(iter); //~ ERROR use of moved value: `iter` +} + +fn main() { + test_write().unwrap(); + test_read().unwrap(); + test_projections(); +} diff --git a/tests/ui/moves/suggest-borrow-for-generic-arg.rs b/tests/ui/moves/suggest-borrow-for-generic-arg.rs new file mode 100644 index 00000000000..e08978db63a --- /dev/null +++ b/tests/ui/moves/suggest-borrow-for-generic-arg.rs @@ -0,0 +1,46 @@ +//! Test suggetions to borrow generic arguments instead of moving. Tests for other instances of this +//! can be found in `moved-value-on-as-ref-arg.rs` and `borrow-closures-instead-of-move.rs` +//@ run-rustfix +//@ aux-crate:aux=suggest-borrow-for-generic-arg-aux.rs +//@ edition: 2021 + +#![allow(unused_mut)] +use std::io::{self, Write}; + +// test for `std::io::Write` (#131413) +fn test_write() -> io::Result<()> { + let mut stdout = io::stdout(); + aux::write_stuff(stdout)?; //~ HELP consider borrowing `stdout` + writeln!(stdout, "second line")?; //~ ERROR borrow of moved value: `stdout` + + let mut buf = Vec::new(); + aux::write_stuff(buf)?; //~ HELP consider mutably borrowing `buf` + //~^ HELP consider cloning the value + writeln!(buf, "second_line") //~ ERROR borrow of moved value: `buf` +} + +/// test for `std::io::Read` (#131413) +fn test_read() -> io::Result<()> { + let stdin = io::stdin(); + aux::read_and_discard(stdin)?; //~ HELP consider borrowing `stdin` + aux::read_and_discard(stdin)?; //~ ERROR use of moved value: `stdin` + + let mut bytes = std::collections::VecDeque::from([1, 2, 3, 4, 5, 6]); + aux::read_and_discard(bytes)?; //~ HELP consider mutably borrowing `bytes` + //~^ HELP consider cloning the value + aux::read_and_discard(bytes) //~ ERROR use of moved value: `bytes` +} + +/// test that suggestions work with projection types in the callee's signature +fn test_projections() { + let mut iter = [1, 2, 3, 4, 5, 6].into_iter(); + let _six: usize = aux::sum_three(iter); //~ HELP consider mutably borrowing `iter` + //~^ HELP consider cloning the value + let _fifteen: usize = aux::sum_three(iter); //~ ERROR use of moved value: `iter` +} + +fn main() { + test_write().unwrap(); + test_read().unwrap(); + test_projections(); +} diff --git a/tests/ui/moves/suggest-borrow-for-generic-arg.stderr b/tests/ui/moves/suggest-borrow-for-generic-arg.stderr new file mode 100644 index 00000000000..07e24f566cb --- /dev/null +++ b/tests/ui/moves/suggest-borrow-for-generic-arg.stderr @@ -0,0 +1,93 @@ +error[E0382]: borrow of moved value: `stdout` + --> $DIR/suggest-borrow-for-generic-arg.rs:14:14 + | +LL | let mut stdout = io::stdout(); + | ---------- move occurs because `stdout` has type `Stdout`, which does not implement the `Copy` trait +LL | aux::write_stuff(stdout)?; + | ------ value moved here +LL | writeln!(stdout, "second line")?; + | ^^^^^^ value borrowed here after move + | +help: consider borrowing `stdout` + | +LL | aux::write_stuff(&stdout)?; + | + + +error[E0382]: borrow of moved value: `buf` + --> $DIR/suggest-borrow-for-generic-arg.rs:19:14 + | +LL | let mut buf = Vec::new(); + | ------- move occurs because `buf` has type `Vec<u8>`, which does not implement the `Copy` trait +LL | aux::write_stuff(buf)?; + | --- value moved here +LL | +LL | writeln!(buf, "second_line") + | ^^^ value borrowed here after move + | +help: consider mutably borrowing `buf` + | +LL | aux::write_stuff(&mut buf)?; + | ++++ +help: consider cloning the value if the performance cost is acceptable + | +LL | aux::write_stuff(buf.clone())?; + | ++++++++ + +error[E0382]: use of moved value: `stdin` + --> $DIR/suggest-borrow-for-generic-arg.rs:26:27 + | +LL | let stdin = io::stdin(); + | ----- move occurs because `stdin` has type `Stdin`, which does not implement the `Copy` trait +LL | aux::read_and_discard(stdin)?; + | ----- value moved here +LL | aux::read_and_discard(stdin)?; + | ^^^^^ value used here after move + | +help: consider borrowing `stdin` + | +LL | aux::read_and_discard(&stdin)?; + | + + +error[E0382]: use of moved value: `bytes` + --> $DIR/suggest-borrow-for-generic-arg.rs:31:27 + | +LL | let mut bytes = std::collections::VecDeque::from([1, 2, 3, 4, 5, 6]); + | --------- move occurs because `bytes` has type `VecDeque<u8>`, which does not implement the `Copy` trait +LL | aux::read_and_discard(bytes)?; + | ----- value moved here +LL | +LL | aux::read_and_discard(bytes) + | ^^^^^ value used here after move + | +help: consider mutably borrowing `bytes` + | +LL | aux::read_and_discard(&mut bytes)?; + | ++++ +help: consider cloning the value if the performance cost is acceptable + | +LL | aux::read_and_discard(bytes.clone())?; + | ++++++++ + +error[E0382]: use of moved value: `iter` + --> $DIR/suggest-borrow-for-generic-arg.rs:39:42 + | +LL | let mut iter = [1, 2, 3, 4, 5, 6].into_iter(); + | -------- move occurs because `iter` has type `std::array::IntoIter<usize, 6>`, which does not implement the `Copy` trait +LL | let _six: usize = aux::sum_three(iter); + | ---- value moved here +LL | +LL | let _fifteen: usize = aux::sum_three(iter); + | ^^^^ value used here after move + | +help: consider mutably borrowing `iter` + | +LL | let _six: usize = aux::sum_three(&mut iter); + | ++++ +help: consider cloning the value if the performance cost is acceptable + | +LL | let _six: usize = aux::sum_three(iter.clone()); + | ++++++++ + +error: aborting due to 5 previous errors + +For more information about this error, try `rustc --explain E0382`. diff --git a/tests/ui/native-library-link-flags/modifiers-bad.blank.stderr b/tests/ui/native-library-link-flags/modifiers-bad.blank.stderr new file mode 100644 index 00000000000..ea36af0b4cf --- /dev/null +++ b/tests/ui/native-library-link-flags/modifiers-bad.blank.stderr @@ -0,0 +1,2 @@ +error: invalid linking modifier syntax, expected '+' or '-' prefix before one of: bundle, verbatim, whole-archive, as-needed + diff --git a/tests/ui/native-library-link-flags/modifiers-bad.no-prefix.stderr b/tests/ui/native-library-link-flags/modifiers-bad.no-prefix.stderr new file mode 100644 index 00000000000..ea36af0b4cf --- /dev/null +++ b/tests/ui/native-library-link-flags/modifiers-bad.no-prefix.stderr @@ -0,0 +1,2 @@ +error: invalid linking modifier syntax, expected '+' or '-' prefix before one of: bundle, verbatim, whole-archive, as-needed + diff --git a/tests/ui/native-library-link-flags/modifiers-bad.prefix-only.stderr b/tests/ui/native-library-link-flags/modifiers-bad.prefix-only.stderr new file mode 100644 index 00000000000..1e701374688 --- /dev/null +++ b/tests/ui/native-library-link-flags/modifiers-bad.prefix-only.stderr @@ -0,0 +1,2 @@ +error: unknown linking modifier ``, expected one of: bundle, verbatim, whole-archive, as-needed + diff --git a/tests/ui/native-library-link-flags/modifiers-bad.rs b/tests/ui/native-library-link-flags/modifiers-bad.rs new file mode 100644 index 00000000000..185201e0d84 --- /dev/null +++ b/tests/ui/native-library-link-flags/modifiers-bad.rs @@ -0,0 +1,11 @@ +//@ edition: 2021 +//@ revisions: blank no-prefix prefix-only unknown + +//@[blank] compile-flags: -l static:=foo +//@[no-prefix] compile-flags: -l static:bundle=foo +//@[prefix-only] compile-flags: -l static:+=foo +//@[unknown] compile-flags: -l static:+ferris=foo + +// Tests various illegal values for the "modifier" part of an `-l` flag. + +fn main() {} diff --git a/tests/ui/native-library-link-flags/modifiers-bad.unknown.stderr b/tests/ui/native-library-link-flags/modifiers-bad.unknown.stderr new file mode 100644 index 00000000000..75950ad9c64 --- /dev/null +++ b/tests/ui/native-library-link-flags/modifiers-bad.unknown.stderr @@ -0,0 +1,2 @@ +error: unknown linking modifier `ferris`, expected one of: bundle, verbatim, whole-archive, as-needed + diff --git a/tests/ui/never_type/defaulted-never-note.nofallback.stderr b/tests/ui/never_type/defaulted-never-note.nofallback.stderr index 6bc4501b6a3..e8d0be10d4d 100644 --- a/tests/ui/never_type/defaulted-never-note.nofallback.stderr +++ b/tests/ui/never_type/defaulted-never-note.nofallback.stderr @@ -4,7 +4,7 @@ warning: this function depends on never type fallback being `()` LL | fn smeg() { | ^^^^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the types explicitly note: in edition 2024, the requirement `!: ImplementedForUnitButNotNever` will fail diff --git a/tests/ui/never_type/defaulted-never-note.rs b/tests/ui/never_type/defaulted-never-note.rs index 40861e73b39..badb5d4c51d 100644 --- a/tests/ui/never_type/defaulted-never-note.rs +++ b/tests/ui/never_type/defaulted-never-note.rs @@ -27,7 +27,7 @@ fn foo<T: ImplementedForUnitButNotNever>(_t: T) {} //[fallback]~| NOTE required by a bound in `foo` fn smeg() { //[nofallback]~^ warn: this function depends on never type fallback being `()` - //[nofallback]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + //[nofallback]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! let _x = return; foo(_x); //[fallback]~^ ERROR the trait bound diff --git a/tests/ui/never_type/dependency-on-fallback-to-unit.rs b/tests/ui/never_type/dependency-on-fallback-to-unit.rs index 5448d0be2c6..fad4c7c7df7 100644 --- a/tests/ui/never_type/dependency-on-fallback-to-unit.rs +++ b/tests/ui/never_type/dependency-on-fallback-to-unit.rs @@ -7,7 +7,7 @@ fn main() { fn def() { //~^ warn: this function depends on never type fallback being `()` - //~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + //~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! match true { false => <_>::default(), true => return, @@ -18,7 +18,7 @@ fn def() { // <https://github.com/rust-lang/rust/issues/39216> fn question_mark() -> Result<(), ()> { //~^ warn: this function depends on never type fallback being `()` - //~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + //~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! deserialize()?; Ok(()) } diff --git a/tests/ui/never_type/dependency-on-fallback-to-unit.stderr b/tests/ui/never_type/dependency-on-fallback-to-unit.stderr index 79f47bb5fbc..2f10428ee93 100644 --- a/tests/ui/never_type/dependency-on-fallback-to-unit.stderr +++ b/tests/ui/never_type/dependency-on-fallback-to-unit.stderr @@ -4,7 +4,7 @@ warning: this function depends on never type fallback being `()` LL | fn def() { | ^^^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the types explicitly note: in edition 2024, the requirement `!: Default` will fail @@ -24,7 +24,7 @@ warning: this function depends on never type fallback being `()` LL | fn question_mark() -> Result<(), ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the types explicitly note: in edition 2024, the requirement `!: Default` will fail diff --git a/tests/ui/never_type/diverging-fallback-control-flow.nofallback.stderr b/tests/ui/never_type/diverging-fallback-control-flow.nofallback.stderr index d40d1da76f9..35b245bd743 100644 --- a/tests/ui/never_type/diverging-fallback-control-flow.nofallback.stderr +++ b/tests/ui/never_type/diverging-fallback-control-flow.nofallback.stderr @@ -4,7 +4,7 @@ warning: this function depends on never type fallback being `()` LL | fn assignment() { | ^^^^^^^^^^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the types explicitly note: in edition 2024, the requirement `!: UnitDefault` will fail @@ -24,7 +24,7 @@ warning: this function depends on never type fallback being `()` LL | fn assignment_rev() { | ^^^^^^^^^^^^^^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the types explicitly note: in edition 2024, the requirement `!: UnitDefault` will fail diff --git a/tests/ui/never_type/diverging-fallback-control-flow.rs b/tests/ui/never_type/diverging-fallback-control-flow.rs index 575e2e9273c..647667126d4 100644 --- a/tests/ui/never_type/diverging-fallback-control-flow.rs +++ b/tests/ui/never_type/diverging-fallback-control-flow.rs @@ -29,7 +29,7 @@ impl UnitDefault for () { fn assignment() { //[nofallback]~^ warn: this function depends on never type fallback being `()` - //[nofallback]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + //[nofallback]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! let x; if true { @@ -41,7 +41,7 @@ fn assignment() { fn assignment_rev() { //[nofallback]~^ warn: this function depends on never type fallback being `()` - //[nofallback]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + //[nofallback]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! let x; if true { diff --git a/tests/ui/never_type/diverging-fallback-no-leak.nofallback.stderr b/tests/ui/never_type/diverging-fallback-no-leak.nofallback.stderr index d11c21d9573..689791fc460 100644 --- a/tests/ui/never_type/diverging-fallback-no-leak.nofallback.stderr +++ b/tests/ui/never_type/diverging-fallback-no-leak.nofallback.stderr @@ -4,7 +4,7 @@ warning: this function depends on never type fallback being `()` LL | fn main() { | ^^^^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the types explicitly note: in edition 2024, the requirement `!: Test` will fail diff --git a/tests/ui/never_type/diverging-fallback-no-leak.rs b/tests/ui/never_type/diverging-fallback-no-leak.rs index c6d59c7f273..75ca491bf46 100644 --- a/tests/ui/never_type/diverging-fallback-no-leak.rs +++ b/tests/ui/never_type/diverging-fallback-no-leak.rs @@ -13,7 +13,7 @@ fn unconstrained_arg<T: Test>(_: T) {} fn main() { //[nofallback]~^ warn: this function depends on never type fallback being `()` - //[nofallback]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + //[nofallback]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! // Here the type variable falls back to `!`, // and hence we get a type error. diff --git a/tests/ui/never_type/diverging-fallback-unconstrained-return.nofallback.stderr b/tests/ui/never_type/diverging-fallback-unconstrained-return.nofallback.stderr index 30a5e60a758..42018c54609 100644 --- a/tests/ui/never_type/diverging-fallback-unconstrained-return.nofallback.stderr +++ b/tests/ui/never_type/diverging-fallback-unconstrained-return.nofallback.stderr @@ -4,7 +4,7 @@ warning: this function depends on never type fallback being `()` LL | fn main() { | ^^^^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the types explicitly note: in edition 2024, the requirement `!: UnitReturn` will fail diff --git a/tests/ui/never_type/diverging-fallback-unconstrained-return.rs b/tests/ui/never_type/diverging-fallback-unconstrained-return.rs index 927991db513..fdea3a94d28 100644 --- a/tests/ui/never_type/diverging-fallback-unconstrained-return.rs +++ b/tests/ui/never_type/diverging-fallback-unconstrained-return.rs @@ -27,7 +27,7 @@ fn unconstrained_return<T: UnitReturn>() -> T { fn main() { //[nofallback]~^ warn: this function depends on never type fallback being `()` - //[nofallback]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + //[nofallback]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! // In Ye Olde Days, the `T` parameter of `unconstrained_return` // winds up "entangled" with the `!` type that results from diff --git a/tests/ui/never_type/fallback-closure-ret.nofallback.stderr b/tests/ui/never_type/fallback-closure-ret.nofallback.stderr index fb0166dd9e0..b5b5d87e7dd 100644 --- a/tests/ui/never_type/fallback-closure-ret.nofallback.stderr +++ b/tests/ui/never_type/fallback-closure-ret.nofallback.stderr @@ -4,7 +4,7 @@ warning: this function depends on never type fallback being `()` LL | fn main() { | ^^^^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the types explicitly note: in edition 2024, the requirement `!: Bar` will fail diff --git a/tests/ui/never_type/fallback-closure-ret.rs b/tests/ui/never_type/fallback-closure-ret.rs index 30f9ac54d0b..f1423354f13 100644 --- a/tests/ui/never_type/fallback-closure-ret.rs +++ b/tests/ui/never_type/fallback-closure-ret.rs @@ -20,6 +20,6 @@ fn foo<R: Bar>(_: impl Fn() -> R) {} fn main() { //[nofallback]~^ warn: this function depends on never type fallback being `()` - //[nofallback]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + //[nofallback]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! foo(|| panic!()); } diff --git a/tests/ui/never_type/impl_trait_fallback.rs b/tests/ui/never_type/impl_trait_fallback.rs index fbe13dbe2ac..bd4caeb2b72 100644 --- a/tests/ui/never_type/impl_trait_fallback.rs +++ b/tests/ui/never_type/impl_trait_fallback.rs @@ -7,6 +7,6 @@ impl T for () {} fn should_ret_unit() -> impl T { //~^ warn: this function depends on never type fallback being `()` - //~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + //~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! panic!() } diff --git a/tests/ui/never_type/impl_trait_fallback.stderr b/tests/ui/never_type/impl_trait_fallback.stderr index 4496746e018..768c226e989 100644 --- a/tests/ui/never_type/impl_trait_fallback.stderr +++ b/tests/ui/never_type/impl_trait_fallback.stderr @@ -4,7 +4,7 @@ warning: this function depends on never type fallback being `()` LL | fn should_ret_unit() -> impl T { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the types explicitly note: in edition 2024, the requirement `!: T` will fail diff --git a/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2015.stderr b/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2015.stderr index 6a48a7b9b47..03bb0ca5f3a 100644 --- a/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2015.stderr +++ b/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2015.stderr @@ -4,7 +4,7 @@ warning: never type fallback affects this call to an `unsafe` function LL | unsafe { mem::zeroed() } | ^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default @@ -19,7 +19,7 @@ warning: never type fallback affects this call to an `unsafe` function LL | core::mem::transmute(Zst) | ^^^^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly help: use `()` annotations to avoid fallback changes @@ -33,7 +33,7 @@ warning: never type fallback affects this union access LL | unsafe { Union { a: () }.b } | ^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly @@ -43,7 +43,7 @@ warning: never type fallback affects this raw pointer dereference LL | unsafe { *ptr::from_ref(&()).cast() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly help: use `()` annotations to avoid fallback changes @@ -57,7 +57,7 @@ warning: never type fallback affects this call to an `unsafe` function LL | unsafe { internally_create(x) } | ^^^^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly help: use `()` annotations to avoid fallback changes @@ -71,7 +71,7 @@ warning: never type fallback affects this call to an `unsafe` function LL | unsafe { zeroed() } | ^^^^^^^^ | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly help: use `()` annotations to avoid fallback changes @@ -85,7 +85,7 @@ warning: never type fallback affects this `unsafe` function LL | let zeroed = mem::zeroed; | ^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly help: use `()` annotations to avoid fallback changes @@ -99,7 +99,7 @@ warning: never type fallback affects this `unsafe` function LL | let f = internally_create; | ^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly help: use `()` annotations to avoid fallback changes @@ -113,7 +113,7 @@ warning: never type fallback affects this call to an `unsafe` method LL | S(marker::PhantomData).create_out_of_thin_air() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly @@ -126,7 +126,7 @@ LL | match send_message::<_ /* ?0 */>() { LL | msg_send!(); | ----------- in this macro invocation | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly = note: this warning originates in the macro `msg_send` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2024.stderr b/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2024.stderr index 844cd62c267..cf12d699f2e 100644 --- a/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2024.stderr +++ b/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2024.stderr @@ -4,7 +4,7 @@ error: never type fallback affects this call to an `unsafe` function LL | unsafe { mem::zeroed() } | ^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default @@ -19,7 +19,7 @@ error: never type fallback affects this call to an `unsafe` function LL | core::mem::transmute(Zst) | ^^^^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly help: use `()` annotations to avoid fallback changes @@ -33,7 +33,7 @@ error: never type fallback affects this union access LL | unsafe { Union { a: () }.b } | ^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly @@ -43,7 +43,7 @@ error: never type fallback affects this raw pointer dereference LL | unsafe { *ptr::from_ref(&()).cast() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly help: use `()` annotations to avoid fallback changes @@ -57,7 +57,7 @@ error: never type fallback affects this call to an `unsafe` function LL | unsafe { internally_create(x) } | ^^^^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly help: use `()` annotations to avoid fallback changes @@ -71,7 +71,7 @@ error: never type fallback affects this call to an `unsafe` function LL | unsafe { zeroed() } | ^^^^^^^^ | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly help: use `()` annotations to avoid fallback changes @@ -85,7 +85,7 @@ error: never type fallback affects this `unsafe` function LL | let zeroed = mem::zeroed; | ^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly help: use `()` annotations to avoid fallback changes @@ -99,7 +99,7 @@ error: never type fallback affects this `unsafe` function LL | let f = internally_create; | ^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly help: use `()` annotations to avoid fallback changes @@ -113,7 +113,7 @@ error: never type fallback affects this call to an `unsafe` method LL | S(marker::PhantomData).create_out_of_thin_air() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly @@ -126,7 +126,7 @@ LL | match send_message::<_ /* ?0 */>() { LL | msg_send!(); | ----------- in this macro invocation | - = warning: this will change its meaning in a future release! + = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748> = help: specify the type explicitly = note: this error originates in the macro `msg_send` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.rs b/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.rs index c96f4dda3f8..19b51eea2f5 100644 --- a/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.rs +++ b/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.rs @@ -13,7 +13,7 @@ fn _zero() { unsafe { mem::zeroed() } //[e2015]~^ warn: never type fallback affects this call to an `unsafe` function //[e2024]~^^ error: never type fallback affects this call to an `unsafe` function - //~| warn: this will change its meaning in a future release! + //~| warn: this changes meaning in Rust 2024 and in a future release in all editions! //[e2024]~| warning: the type `!` does not permit zero-initialization } else { return; @@ -30,7 +30,7 @@ fn _trans() { core::mem::transmute(Zst) //[e2015]~^ warn: never type fallback affects this call to an `unsafe` function //[e2024]~^^ error: never type fallback affects this call to an `unsafe` function - //~| warn: this will change its meaning in a future release! + //~| warn: this changes meaning in Rust 2024 and in a future release in all editions! } } else { return; @@ -47,7 +47,7 @@ fn _union() { unsafe { Union { a: () }.b } //[e2015]~^ warn: never type fallback affects this union access //[e2024]~^^ error: never type fallback affects this union access - //~| warn: this will change its meaning in a future release! + //~| warn: this changes meaning in Rust 2024 and in a future release in all editions! } else { return; }; @@ -58,7 +58,7 @@ fn _deref() { unsafe { *ptr::from_ref(&()).cast() } //[e2015]~^ warn: never type fallback affects this raw pointer dereference //[e2024]~^^ error: never type fallback affects this raw pointer dereference - //~| warn: this will change its meaning in a future release! + //~| warn: this changes meaning in Rust 2024 and in a future release in all editions! } else { return; }; @@ -79,7 +79,7 @@ fn _only_generics() { unsafe { internally_create(x) } //[e2015]~^ warn: never type fallback affects this call to an `unsafe` function //[e2024]~^^ error: never type fallback affects this call to an `unsafe` function - //~| warn: this will change its meaning in a future release! + //~| warn: this changes meaning in Rust 2024 and in a future release in all editions! x.unwrap() } else { @@ -92,12 +92,12 @@ fn _stored_function() { let zeroed = mem::zeroed; //[e2015]~^ warn: never type fallback affects this `unsafe` function //[e2024]~^^ error: never type fallback affects this `unsafe` function - //~| warn: this will change its meaning in a future release! + //~| warn: this changes meaning in Rust 2024 and in a future release in all editions! unsafe { zeroed() } //[e2015]~^ warn: never type fallback affects this call to an `unsafe` function //[e2024]~^^ error: never type fallback affects this call to an `unsafe` function - //~| warn: this will change its meaning in a future release! + //~| warn: this changes meaning in Rust 2024 and in a future release in all editions! } else { return; }; @@ -115,7 +115,7 @@ fn _only_generics_stored_function() { let f = internally_create; //[e2015]~^ warn: never type fallback affects this `unsafe` function //[e2024]~^^ error: never type fallback affects this `unsafe` function - //~| warn: this will change its meaning in a future release! + //~| warn: this changes meaning in Rust 2024 and in a future release in all editions! unsafe { f(x) } @@ -140,7 +140,7 @@ fn _method() { S(marker::PhantomData).create_out_of_thin_air() //[e2015]~^ warn: never type fallback affects this call to an `unsafe` method //[e2024]~^^ error: never type fallback affects this call to an `unsafe` method - //~| warn: this will change its meaning in a future release! + //~| warn: this changes meaning in Rust 2024 and in a future release in all editions! } } else { return; @@ -158,7 +158,7 @@ fn _objc() { match send_message::<_ /* ?0 */>() { //[e2015]~^ warn: never type fallback affects this call to an `unsafe` function //[e2024]~^^ error: never type fallback affects this call to an `unsafe` function - //~| warn: this will change its meaning in a future release! + //~| warn: this changes meaning in Rust 2024 and in a future release in all editions! Ok(x) => x, Err(_) => loop {}, } diff --git a/tests/ui/not-copy-closure.stderr b/tests/ui/not-copy-closure.stderr index 50e25a24d81..60cb1352313 100644 --- a/tests/ui/not-copy-closure.stderr +++ b/tests/ui/not-copy-closure.stderr @@ -11,10 +11,6 @@ note: closure cannot be moved more than once as it is not `Copy` due to moving t | LL | a += 1; | ^ -help: consider mutably borrowing `hello` - | -LL | let b = &mut hello; - | ++++ error: aborting due to 1 previous error diff --git a/tests/ui/parser/bad-if-statements.stderr b/tests/ui/parser/bad-if-statements.stderr index ee839db6455..320b1176993 100644 --- a/tests/ui/parser/bad-if-statements.stderr +++ b/tests/ui/parser/bad-if-statements.stderr @@ -29,7 +29,7 @@ note: the `if` expression is missing a block after this condition | LL | if true x | ^^^^ -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | if true { x } | + + @@ -65,7 +65,7 @@ note: the `if` expression is missing a block after this condition | LL | if true x else {} | ^^^^ -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | if true { x } else {} | + + diff --git a/tests/ui/parser/block-no-opening-brace.stderr b/tests/ui/parser/block-no-opening-brace.stderr index 83360944ed5..b65de4eac3f 100644 --- a/tests/ui/parser/block-no-opening-brace.stderr +++ b/tests/ui/parser/block-no-opening-brace.stderr @@ -6,7 +6,7 @@ LL | loop LL | let x = 0; | ^^^ expected `{` | -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | { let x = 0; } | + + @@ -21,7 +21,7 @@ LL | while true LL | let x = 0; | ^^^ expected `{` | -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | { let x = 0; } | + + @@ -32,7 +32,7 @@ error: expected `{`, found keyword `let` LL | let x = 0; | ^^^ expected `{` | -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | { let x = 0; } | + + diff --git a/tests/ui/parser/closure-return-syntax.stderr b/tests/ui/parser/closure-return-syntax.stderr index eb8428854af..aacc31ed871 100644 --- a/tests/ui/parser/closure-return-syntax.stderr +++ b/tests/ui/parser/closure-return-syntax.stderr @@ -4,7 +4,7 @@ error: expected `{`, found `22` LL | let x = || -> i32 22; | ^^ expected `{` | -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | let x = || -> i32 { 22 }; | + + diff --git a/tests/ui/parser/else-no-if.stderr b/tests/ui/parser/else-no-if.stderr index 2e3e8f6b50e..eec64b0f4bc 100644 --- a/tests/ui/parser/else-no-if.stderr +++ b/tests/ui/parser/else-no-if.stderr @@ -30,7 +30,7 @@ error: expected `{`, found `falsy` LL | } else falsy(); | ^^^^^ expected `{` | -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | } else { falsy() }; | + + @@ -41,7 +41,7 @@ error: expected `{`, found keyword `loop` LL | } else loop{} | ^^^^ expected `{` | -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | } else { loop{} } | + + @@ -65,7 +65,7 @@ error: expected `{`, found `falsy` LL | } else falsy!(); | ^^^^^ expected `{` | -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | } else { falsy!() }; | + + @@ -74,12 +74,14 @@ error: expected `{`, found `falsy` --> $DIR/else-no-if.rs:47:12 | LL | } else falsy! {} { - | ^^^^^ expected `{` + | ---- ^^^^^ + | | + | expected an `if` or a block after this `else` | -help: try placing this code inside a block +help: add an `if` if this is the condition of a chained `else if` statement | -LL | } else { falsy! {} } { - | + + +LL | } else if falsy! {} { + | ++ error: expected `{`, found `falsy` --> $DIR/else-no-if.rs:54:12 @@ -87,7 +89,7 @@ error: expected `{`, found `falsy` LL | } else falsy! {}; | ^^^^^ expected `{` | -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | } else { falsy! {} }; | + + diff --git a/tests/ui/parser/label-after-block-like.stderr b/tests/ui/parser/label-after-block-like.stderr index be8c679d8ce..4dea225e3f3 100644 --- a/tests/ui/parser/label-after-block-like.stderr +++ b/tests/ui/parser/label-after-block-like.stderr @@ -23,7 +23,7 @@ note: the `if` expression is missing a block after this condition | LL | if let () = () 'a {} | ^^^^^^^^^^^ -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | if let () = () { 'a {} } | + + @@ -53,7 +53,7 @@ note: the `if` expression is missing a block after this condition | LL | if true 'a {} | ^^^^ -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | if true { 'a {} } | + + @@ -80,7 +80,7 @@ LL | loop 'a {} | | | while parsing this `loop` expression | -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | loop { 'a {} } | + + @@ -108,7 +108,7 @@ LL | while true 'a {} | | this `while` condition successfully parsed | while parsing the body of this `while` expression | -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | while true { 'a {} } | + + @@ -136,7 +136,7 @@ LL | while let () = () 'a {} | | this `while` condition successfully parsed | while parsing the body of this `while` expression | -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | while let () = () { 'a {} } | + + @@ -161,7 +161,7 @@ error: expected `{`, found `'a` LL | for _ in 0..0 'a {} | ^^ expected `{` | -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | for _ in 0..0 { 'a {} } | + + @@ -188,7 +188,7 @@ LL | unsafe 'a {} | | | while parsing this `unsafe` expression | -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | unsafe { 'a {} } | + + diff --git a/tests/ui/parser/recover/missing-dot-on-if-condition-expression-fixable.fixed b/tests/ui/parser/recover/missing-dot-on-if-condition-expression-fixable.fixed new file mode 100644 index 00000000000..ea9dc4cf6cc --- /dev/null +++ b/tests/ui/parser/recover/missing-dot-on-if-condition-expression-fixable.fixed @@ -0,0 +1,39 @@ +//@ run-rustfix +#![allow(dead_code)] +fn main() { + for _ in [1, 2, 3].iter().map(|x| x) {} + //~^ ERROR expected `{`, found `map` + //~| HELP you might have meant to write a method call +} +fn foo5() { + let x = (vec![1, 2, 3],); + for _ in x.0 {} + //~^ ERROR expected `{`, found `0` + //~| HELP you might have meant to write a field access +} +fn foo6() { + let x = ((vec![1, 2, 3],),); + for _ in x.0.0 {} + //~^ ERROR expected `{`, found `0.0` + //~| HELP you might have meant to write a field access +} +fn foo7() { + let x = Some(vec![1, 2, 3]); + for _ in x.unwrap() {} + //~^ ERROR expected `{`, found `unwrap` + //~| HELP you might have meant to write a method call +} +fn foo8() { + let x = S { a: A { b: vec![1, 2, 3] } }; + for _ in x.a.b {} + //~^ ERROR expected `{`, found `a` + //~| HELP you might have meant to write a field access +} + +struct S { + a: A, +} + +struct A { + b: Vec<i32>, +} diff --git a/tests/ui/parser/recover/missing-dot-on-if-condition-expression-fixable.rs b/tests/ui/parser/recover/missing-dot-on-if-condition-expression-fixable.rs new file mode 100644 index 00000000000..1833f458a8a --- /dev/null +++ b/tests/ui/parser/recover/missing-dot-on-if-condition-expression-fixable.rs @@ -0,0 +1,39 @@ +//@ run-rustfix +#![allow(dead_code)] +fn main() { + for _ in [1, 2, 3].iter()map(|x| x) {} + //~^ ERROR expected `{`, found `map` + //~| HELP you might have meant to write a method call +} +fn foo5() { + let x = (vec![1, 2, 3],); + for _ in x 0 {} + //~^ ERROR expected `{`, found `0` + //~| HELP you might have meant to write a field access +} +fn foo6() { + let x = ((vec![1, 2, 3],),); + for _ in x 0.0 {} + //~^ ERROR expected `{`, found `0.0` + //~| HELP you might have meant to write a field access +} +fn foo7() { + let x = Some(vec![1, 2, 3]); + for _ in x unwrap() {} + //~^ ERROR expected `{`, found `unwrap` + //~| HELP you might have meant to write a method call +} +fn foo8() { + let x = S { a: A { b: vec![1, 2, 3] } }; + for _ in x a.b {} + //~^ ERROR expected `{`, found `a` + //~| HELP you might have meant to write a field access +} + +struct S { + a: A, +} + +struct A { + b: Vec<i32>, +} diff --git a/tests/ui/parser/recover/missing-dot-on-if-condition-expression-fixable.stderr b/tests/ui/parser/recover/missing-dot-on-if-condition-expression-fixable.stderr new file mode 100644 index 00000000000..87f76efffa6 --- /dev/null +++ b/tests/ui/parser/recover/missing-dot-on-if-condition-expression-fixable.stderr @@ -0,0 +1,57 @@ +error: expected `{`, found `map` + --> $DIR/missing-dot-on-if-condition-expression-fixable.rs:4:30 + | +LL | for _ in [1, 2, 3].iter()map(|x| x) {} + | ^^^ expected `{` + | +help: you might have meant to write a method call + | +LL | for _ in [1, 2, 3].iter().map(|x| x) {} + | + + +error: expected `{`, found `0` + --> $DIR/missing-dot-on-if-condition-expression-fixable.rs:10:16 + | +LL | for _ in x 0 {} + | ^ expected `{` + | +help: you might have meant to write a field access + | +LL | for _ in x.0 {} + | + + +error: expected `{`, found `0.0` + --> $DIR/missing-dot-on-if-condition-expression-fixable.rs:16:16 + | +LL | for _ in x 0.0 {} + | ^^^ expected `{` + | +help: you might have meant to write a field access + | +LL | for _ in x.0.0 {} + | + + +error: expected `{`, found `unwrap` + --> $DIR/missing-dot-on-if-condition-expression-fixable.rs:22:16 + | +LL | for _ in x unwrap() {} + | ^^^^^^ expected `{` + | +help: you might have meant to write a method call + | +LL | for _ in x.unwrap() {} + | + + +error: expected `{`, found `a` + --> $DIR/missing-dot-on-if-condition-expression-fixable.rs:28:16 + | +LL | for _ in x a.b {} + | ^ expected `{` + | +help: you might have meant to write a field access + | +LL | for _ in x.a.b {} + | + + +error: aborting due to 5 previous errors + diff --git a/tests/ui/parser/recover/missing-dot-on-if-condition-expression.rs b/tests/ui/parser/recover/missing-dot-on-if-condition-expression.rs new file mode 100644 index 00000000000..c4a9ed66a83 --- /dev/null +++ b/tests/ui/parser/recover/missing-dot-on-if-condition-expression.rs @@ -0,0 +1,57 @@ +fn main() { + for _ in [1, 2, 3].iter()map(|x| x) {} + //~^ ERROR expected `{`, found `map` + //~| HELP you might have meant to write a method call +} +fn foo1() { + for _ in 1.3f64 cos() {} + //~^ ERROR expected `{`, found `cos` + //~| HELP you might have meant to write a method call +} +fn foo2() { + for _ in 1.3 cos {} + //~^ ERROR expected `{`, found `cos` + //~| HELP you might have meant to write a field access +} +fn foo3() { + for _ in 1 cos() {} + //~^ ERROR expected `{`, found `cos` + //~| HELP you might have meant to write a method call +} +fn foo4() { + for _ in 1 cos {} + //~^ ERROR expected `{`, found `cos` + //~| HELP you might have meant to write a field access +} +fn foo5() { + let x = (vec![1, 2, 3],); + for _ in x 0 {} + //~^ ERROR expected `{`, found `0` + //~| HELP you might have meant to write a field access +} +fn foo6() { + let x = ((vec![1, 2, 3],),); + for _ in x 0.0 {} + //~^ ERROR expected `{`, found `0.0` + //~| HELP you might have meant to write a field access +} +fn foo7() { + let x = Some(vec![1, 2, 3]); + for _ in x unwrap() {} + //~^ ERROR expected `{`, found `unwrap` + //~| HELP you might have meant to write a method call +} +fn foo8() { + let x = S { a: A { b: vec![1, 2, 3] } }; + for _ in x a.b {} + //~^ ERROR expected `{`, found `a` + //~| HELP you might have meant to write a field access +} + +struct S { + a: A, +} + +struct A { + b: Vec<i32>, +} diff --git a/tests/ui/parser/recover/missing-dot-on-if-condition-expression.stderr b/tests/ui/parser/recover/missing-dot-on-if-condition-expression.stderr new file mode 100644 index 00000000000..bfb72b95682 --- /dev/null +++ b/tests/ui/parser/recover/missing-dot-on-if-condition-expression.stderr @@ -0,0 +1,101 @@ +error: expected `{`, found `map` + --> $DIR/missing-dot-on-if-condition-expression.rs:2:30 + | +LL | for _ in [1, 2, 3].iter()map(|x| x) {} + | ^^^ expected `{` + | +help: you might have meant to write a method call + | +LL | for _ in [1, 2, 3].iter().map(|x| x) {} + | + + +error: expected `{`, found `cos` + --> $DIR/missing-dot-on-if-condition-expression.rs:7:21 + | +LL | for _ in 1.3f64 cos() {} + | ^^^ expected `{` + | +help: you might have meant to write a method call + | +LL | for _ in 1.3f64.cos() {} + | + + +error: expected `{`, found `cos` + --> $DIR/missing-dot-on-if-condition-expression.rs:12:18 + | +LL | for _ in 1.3 cos {} + | ^^^ expected `{` + | +help: you might have meant to write a field access + | +LL | for _ in 1.3.cos {} + | + + +error: expected `{`, found `cos` + --> $DIR/missing-dot-on-if-condition-expression.rs:17:16 + | +LL | for _ in 1 cos() {} + | ^^^ expected `{` + | +help: you might have meant to write a method call + | +LL | for _ in 1.cos() {} + | + + +error: expected `{`, found `cos` + --> $DIR/missing-dot-on-if-condition-expression.rs:22:16 + | +LL | for _ in 1 cos {} + | ^^^ expected `{` + | +help: you might have meant to write a field access + | +LL | for _ in 1.cos {} + | + + +error: expected `{`, found `0` + --> $DIR/missing-dot-on-if-condition-expression.rs:28:16 + | +LL | for _ in x 0 {} + | ^ expected `{` + | +help: you might have meant to write a field access + | +LL | for _ in x.0 {} + | + + +error: expected `{`, found `0.0` + --> $DIR/missing-dot-on-if-condition-expression.rs:34:16 + | +LL | for _ in x 0.0 {} + | ^^^ expected `{` + | +help: you might have meant to write a field access + | +LL | for _ in x.0.0 {} + | + + +error: expected `{`, found `unwrap` + --> $DIR/missing-dot-on-if-condition-expression.rs:40:16 + | +LL | for _ in x unwrap() {} + | ^^^^^^ expected `{` + | +help: you might have meant to write a method call + | +LL | for _ in x.unwrap() {} + | + + +error: expected `{`, found `a` + --> $DIR/missing-dot-on-if-condition-expression.rs:46:16 + | +LL | for _ in x a.b {} + | ^ expected `{` + | +help: you might have meant to write a field access + | +LL | for _ in x.a.b {} + | + + +error: aborting due to 9 previous errors + diff --git a/tests/ui/parser/suggest-const-for-global-var.stderr b/tests/ui/parser/suggest-const-for-global-var.stderr index 235e621d882..6ac7fe8f092 100644 --- a/tests/ui/parser/suggest-const-for-global-var.stderr +++ b/tests/ui/parser/suggest-const-for-global-var.stderr @@ -2,7 +2,12 @@ error: expected item, found keyword `let` --> $DIR/suggest-const-for-global-var.rs:1:1 | LL | let X: i32 = 12; - | ^^^ consider using `const` or `static` instead of `let` for global variables + | ^^^ + | | + | `let` cannot be used for global variables + | help: consider using `static` or `const` instead of `let` + | + = note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html> error: aborting due to 1 previous error diff --git a/tests/ui/parser/suggest-static-for-global-var-mut.rs b/tests/ui/parser/suggest-static-for-global-var-mut.rs new file mode 100644 index 00000000000..c63b09bb7a7 --- /dev/null +++ b/tests/ui/parser/suggest-static-for-global-var-mut.rs @@ -0,0 +1,5 @@ +let mut _data = vec![1,2,3]; +//~^ ERROR expected item, found keyword `let` + +fn main() { +} diff --git a/tests/ui/parser/suggest-static-for-global-var-mut.stderr b/tests/ui/parser/suggest-static-for-global-var-mut.stderr new file mode 100644 index 00000000000..4b00d1a24f3 --- /dev/null +++ b/tests/ui/parser/suggest-static-for-global-var-mut.stderr @@ -0,0 +1,11 @@ +error: expected item, found keyword `let` + --> $DIR/suggest-static-for-global-var-mut.rs:1:1 + | +LL | let mut _data = vec![1,2,3]; + | ^^^ `let` cannot be used for global variables + | + = help: consider using `static` and a `Mutex` instead of `let mut` + = note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html> + +error: aborting due to 1 previous error + diff --git a/tests/ui/parser/unnecessary-let.fixed b/tests/ui/parser/unnecessary-let.fixed new file mode 100644 index 00000000000..bdee07e76aa --- /dev/null +++ b/tests/ui/parser/unnecessary-let.fixed @@ -0,0 +1,13 @@ +//@ run-rustfix + +fn main() { + for _x in [1, 2, 3] {} + //~^ ERROR expected pattern, found `let` + //~| ERROR missing `in` in `for` loop + + match 1 { + 1 => {} + //~^ ERROR expected pattern, found `let` + _ => {} + } +} diff --git a/tests/ui/parser/unnecessary-let.rs b/tests/ui/parser/unnecessary-let.rs index 6279109621d..a889d9f7789 100644 --- a/tests/ui/parser/unnecessary-let.rs +++ b/tests/ui/parser/unnecessary-let.rs @@ -1,5 +1,7 @@ +//@ run-rustfix + fn main() { - for let x of [1, 2, 3] {} + for let _x of [1, 2, 3] {} //~^ ERROR expected pattern, found `let` //~| ERROR missing `in` in `for` loop diff --git a/tests/ui/parser/unnecessary-let.stderr b/tests/ui/parser/unnecessary-let.stderr index 05ac1faafd4..0b28123747a 100644 --- a/tests/ui/parser/unnecessary-let.stderr +++ b/tests/ui/parser/unnecessary-let.stderr @@ -1,31 +1,31 @@ error: expected pattern, found `let` - --> $DIR/unnecessary-let.rs:2:9 + --> $DIR/unnecessary-let.rs:4:9 | -LL | for let x of [1, 2, 3] {} - | ^^^^ +LL | for let _x of [1, 2, 3] {} + | ^^^ | help: remove the unnecessary `let` keyword | -LL - for let x of [1, 2, 3] {} -LL + for x of [1, 2, 3] {} +LL - for let _x of [1, 2, 3] {} +LL + for _x of [1, 2, 3] {} | error: missing `in` in `for` loop - --> $DIR/unnecessary-let.rs:2:15 + --> $DIR/unnecessary-let.rs:4:16 | -LL | for let x of [1, 2, 3] {} - | ^^ +LL | for let _x of [1, 2, 3] {} + | ^^ | help: try using `in` here instead | -LL | for let x in [1, 2, 3] {} - | ~~ +LL | for let _x in [1, 2, 3] {} + | ~~ error: expected pattern, found `let` - --> $DIR/unnecessary-let.rs:7:9 + --> $DIR/unnecessary-let.rs:9:9 | LL | let 1 => {} - | ^^^^ + | ^^^ | help: remove the unnecessary `let` keyword | diff --git a/tests/ui/pattern/usefulness/conflicting_bindings.rs b/tests/ui/pattern/usefulness/conflicting_bindings.rs index 0b3e7ce9e9a..16737e0a894 100644 --- a/tests/ui/pattern/usefulness/conflicting_bindings.rs +++ b/tests/ui/pattern/usefulness/conflicting_bindings.rs @@ -10,6 +10,8 @@ fn main() { //~^ ERROR: mutable more than once if let Some(ref mut y @ ref mut z) = x && true {} //~^ ERROR: mutable more than once + if let Some(_) = Some(()) && let Some(ref mut y @ ref mut z) = x && true {} + //~^ ERROR: mutable more than once while let Some(ref mut y @ ref mut z) = x {} //~^ ERROR: mutable more than once while let Some(ref mut y @ ref mut z) = x && true {} diff --git a/tests/ui/pattern/usefulness/conflicting_bindings.stderr b/tests/ui/pattern/usefulness/conflicting_bindings.stderr index 679fc83e7f5..6f6504e6f64 100644 --- a/tests/ui/pattern/usefulness/conflicting_bindings.stderr +++ b/tests/ui/pattern/usefulness/conflicting_bindings.stderr @@ -31,7 +31,15 @@ LL | if let Some(ref mut y @ ref mut z) = x && true {} | value is mutably borrowed by `y` here error: cannot borrow value as mutable more than once at a time - --> $DIR/conflicting_bindings.rs:13:20 + --> $DIR/conflicting_bindings.rs:13:43 + | +LL | if let Some(_) = Some(()) && let Some(ref mut y @ ref mut z) = x && true {} + | ^^^^^^^^^ --------- value is mutably borrowed by `z` here + | | + | value is mutably borrowed by `y` here + +error: cannot borrow value as mutable more than once at a time + --> $DIR/conflicting_bindings.rs:15:20 | LL | while let Some(ref mut y @ ref mut z) = x {} | ^^^^^^^^^ --------- value is mutably borrowed by `z` here @@ -39,7 +47,7 @@ LL | while let Some(ref mut y @ ref mut z) = x {} | value is mutably borrowed by `y` here error: cannot borrow value as mutable more than once at a time - --> $DIR/conflicting_bindings.rs:15:20 + --> $DIR/conflicting_bindings.rs:17:20 | LL | while let Some(ref mut y @ ref mut z) = x && true {} | ^^^^^^^^^ --------- value is mutably borrowed by `z` here @@ -47,7 +55,7 @@ LL | while let Some(ref mut y @ ref mut z) = x && true {} | value is mutably borrowed by `y` here error: cannot borrow value as mutable more than once at a time - --> $DIR/conflicting_bindings.rs:18:9 + --> $DIR/conflicting_bindings.rs:20:9 | LL | ref mut y @ ref mut z => {} | ^^^^^^^^^ --------- value is mutably borrowed by `z` here @@ -55,12 +63,12 @@ LL | ref mut y @ ref mut z => {} | value is mutably borrowed by `y` here error: cannot borrow value as mutable more than once at a time - --> $DIR/conflicting_bindings.rs:21:24 + --> $DIR/conflicting_bindings.rs:23:24 | LL | () if let Some(ref mut y @ ref mut z) = x => {} | ^^^^^^^^^ --------- value is mutably borrowed by `z` here | | | value is mutably borrowed by `y` here -error: aborting due to 8 previous errors +error: aborting due to 9 previous errors diff --git a/tests/ui/pattern/usefulness/match-arm-statics-2.stderr b/tests/ui/pattern/usefulness/match-arm-statics-2.stderr index e4dd35a5995..60b4fcca286 100644 --- a/tests/ui/pattern/usefulness/match-arm-statics-2.stderr +++ b/tests/ui/pattern/usefulness/match-arm-statics-2.stderr @@ -3,8 +3,20 @@ error[E0004]: non-exhaustive patterns: `(true, false)` not covered | LL | match (true, false) { | ^^^^^^^^^^^^^ pattern `(true, false)` not covered +LL | +LL | TRUE_TRUE => (), + | --------- this pattern doesn't introduce a new catch-all binding, but rather pattern matches against the value of constant `TRUE_TRUE` | = note: the matched value is of type `(bool, bool)` +note: constant `TRUE_TRUE` defined here + --> $DIR/match-arm-statics-2.rs:14:1 + | +LL | const TRUE_TRUE: (bool, bool) = (true, true); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +help: if you meant to introduce a binding, use a different name + | +LL | TRUE_TRUE_var => (), + | ++++ help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown | LL ~ (false, true) => (), diff --git a/tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr b/tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr index a8786d02414..0a3991fe3d1 100644 --- a/tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr +++ b/tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr @@ -199,8 +199,20 @@ error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered | LL | match s { | ^ patterns `&[]` and `&[_, _, ..]` not covered +LL | +LL | CONST => {} + | ----- this pattern doesn't introduce a new catch-all binding, but rather pattern matches against the value of constant `CONST` | = note: the matched value is of type `&[bool]` +note: constant `CONST` defined here + --> $DIR/slice-patterns-exhaustiveness.rs:88:5 + | +LL | const CONST: &[bool] = &[true]; + | ^^^^^^^^^^^^^^^^^^^^ +help: if you meant to introduce a binding, use a different name + | +LL | CONST_var => {} + | ++++ help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms | LL ~ CONST => {}, @@ -212,8 +224,20 @@ error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered | LL | match s { | ^ patterns `&[]` and `&[_, _, ..]` not covered +LL | +LL | CONST => {} + | ----- this pattern doesn't introduce a new catch-all binding, but rather pattern matches against the value of constant `CONST` | = note: the matched value is of type `&[bool]` +note: constant `CONST` defined here + --> $DIR/slice-patterns-exhaustiveness.rs:88:5 + | +LL | const CONST: &[bool] = &[true]; + | ^^^^^^^^^^^^^^^^^^^^ +help: if you meant to introduce a binding, use a different name + | +LL | CONST_var => {} + | ++++ help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms | LL ~ &[false] => {}, @@ -225,8 +249,20 @@ error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered | LL | match s { | ^ patterns `&[]` and `&[_, _, ..]` not covered +... +LL | CONST => {} + | ----- this pattern doesn't introduce a new catch-all binding, but rather pattern matches against the value of constant `CONST` | = note: the matched value is of type `&[bool]` +note: constant `CONST` defined here + --> $DIR/slice-patterns-exhaustiveness.rs:88:5 + | +LL | const CONST: &[bool] = &[true]; + | ^^^^^^^^^^^^^^^^^^^^ +help: if you meant to introduce a binding, use a different name + | +LL | CONST_var => {} + | ++++ help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms | LL ~ CONST => {}, @@ -238,8 +274,20 @@ error[E0004]: non-exhaustive patterns: `&[_, _, ..]` not covered | LL | match s { | ^ pattern `&[_, _, ..]` not covered +... +LL | CONST => {} + | ----- this pattern doesn't introduce a new catch-all binding, but rather pattern matches against the value of constant `CONST` | = note: the matched value is of type `&[bool]` +note: constant `CONST` defined here + --> $DIR/slice-patterns-exhaustiveness.rs:88:5 + | +LL | const CONST: &[bool] = &[true]; + | ^^^^^^^^^^^^^^^^^^^^ +help: if you meant to introduce a binding, use a different name + | +LL | CONST_var => {} + | ++++ help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown | LL ~ CONST => {}, @@ -251,8 +299,20 @@ error[E0004]: non-exhaustive patterns: `&[false]` not covered | LL | match s { | ^ pattern `&[false]` not covered +... +LL | CONST => {} + | ----- this pattern doesn't introduce a new catch-all binding, but rather pattern matches against the value of constant `CONST` | = note: the matched value is of type `&[bool]` +note: constant `CONST` defined here + --> $DIR/slice-patterns-exhaustiveness.rs:88:5 + | +LL | const CONST: &[bool] = &[true]; + | ^^^^^^^^^^^^^^^^^^^^ +help: if you meant to introduce a binding, use a different name + | +LL | CONST_var => {} + | ++++ help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown | LL ~ &[_, _, ..] => {}, @@ -264,8 +324,20 @@ error[E0004]: non-exhaustive patterns: `&[false]` not covered | LL | match s1 { | ^^ pattern `&[false]` not covered +LL | +LL | CONST1 => {} + | ------ this pattern doesn't introduce a new catch-all binding, but rather pattern matches against the value of constant `CONST1` | = note: the matched value is of type `&[bool; 1]` +note: constant `CONST1` defined here + --> $DIR/slice-patterns-exhaustiveness.rs:124:5 + | +LL | const CONST1: &[bool; 1] = &[true]; + | ^^^^^^^^^^^^^^^^^^^^^^^^ +help: if you meant to introduce a binding, use a different name + | +LL | CONST1_var => {} + | ++++ help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown | LL ~ CONST1 => {}, diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.rs index 5c333cd7795..47653efffb7 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.rs @@ -94,4 +94,15 @@ fn use_in_arm_ok(c: bool) { }; } +fn use_in_same_chain(c: bool) { + let x: Box<_> = Box::new(1); + + let v = (1, 2); + + match v { + (1, 2) if let y = x && c && let z = x => false, //~ ERROR use of moved value: `x` + _ => true, + }; +} + fn main() {} diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.stderr b/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.stderr index 087e54244b3..123c5f19430 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.stderr +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.stderr @@ -60,6 +60,22 @@ help: borrow this binding in the pattern to avoid moving the value LL | (1, 2) if let ref y = x && c => false, | +++ -error: aborting due to 4 previous errors +error[E0382]: use of moved value: `x` + --> $DIR/move-guard-if-let-chain.rs:103:41 + | +LL | let x: Box<_> = Box::new(1); + | - move occurs because `x` has type `Box<i32>`, which does not implement the `Copy` trait +... +LL | (1, 2) if let y = x && c && let z = x => false, + | - ^ value used here after move + | | + | value moved here + | +help: borrow this binding in the pattern to avoid moving the value + | +LL | (1, 2) if let ref y = x && c && let z = x => false, + | +++ + +error: aborting due to 5 previous errors For more information about this error, try `rustc --explain E0382`. diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/temporary-early-drop.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/temporary-early-drop.rs new file mode 100644 index 00000000000..389c76337f0 --- /dev/null +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/temporary-early-drop.rs @@ -0,0 +1,25 @@ +// issue-103476 +//@ compile-flags: -Zlint-mir -Zunstable-options +//@ edition: 2024 +//@ check-pass + +#![feature(let_chains)] +#![allow(irrefutable_let_patterns)] + +struct Pd; + +impl Pd { + fn it(&self) -> It { + todo!() + } +} + +pub struct It<'a>(Box<dyn Tr<'a>>); + +trait Tr<'a> {} + +fn f(m: Option<Pd>) { + if let Some(n) = m && let it = n.it() {}; +} + +fn main() {} diff --git a/tests/ui/stats/hir-stats.rs b/tests/ui/stats/input-stats.rs index 7c5da8cf554..f19a53cc610 100644 --- a/tests/ui/stats/hir-stats.rs +++ b/tests/ui/stats/input-stats.rs @@ -1,6 +1,6 @@ //@ check-pass -//@ compile-flags: -Zhir-stats -//@ only-x86_64 +//@ compile-flags: -Zinput-stats +//@ only-64bit // layout randomization affects the hir stat output //@ needs-deterministic-layouts @@ -11,7 +11,7 @@ // The aim here is to include at least one of every different type of top-level -// AST/HIR node reported by `-Zhir-stats`. +// AST/HIR node reported by `-Zinput-stats`. #![allow(dead_code)] diff --git a/tests/ui/stats/hir-stats.stderr b/tests/ui/stats/input-stats.stderr index bd0c8cbc3b1..2cc2c8019fa 100644 --- a/tests/ui/stats/hir-stats.stderr +++ b/tests/ui/stats/input-stats.stderr @@ -53,7 +53,7 @@ ast-stats-1 - Enum 136 ( 2.0%) 1 ast-stats-1 - Fn 272 ( 4.1%) 2 ast-stats-1 - Use 408 ( 6.1%) 3 ast-stats-1 ---------------------------------------------------------------- -ast-stats-1 Total 6_640 +ast-stats-1 Total 6_640 116 ast-stats-1 ast-stats-2 POST EXPANSION AST STATS ast-stats-2 Name Accumulated Size Count Item Size @@ -113,7 +113,7 @@ ast-stats-2 - ForeignMod 136 ( 1.9%) 1 ast-stats-2 - Fn 272 ( 3.7%) 2 ast-stats-2 - Use 544 ( 7.5%) 4 ast-stats-2 ---------------------------------------------------------------- -ast-stats-2 Total 7_288 +ast-stats-2 Total 7_288 127 ast-stats-2 hir-stats HIR STATS hir-stats Name Accumulated Size Count Item Size @@ -174,5 +174,5 @@ hir-stats - Use 352 ( 3.9%) 4 hir-stats Path 1_240 (13.7%) 31 40 hir-stats PathSegment 1_920 (21.3%) 40 48 hir-stats ---------------------------------------------------------------- -hir-stats Total 9_024 +hir-stats Total 9_024 180 hir-stats diff --git a/tests/ui/structs-enums/enum-rec/issue-17431-6.rs b/tests/ui/structs-enums/enum-rec/issue-17431-6.rs index 0183bdba111..a3b510848dc 100644 --- a/tests/ui/structs-enums/enum-rec/issue-17431-6.rs +++ b/tests/ui/structs-enums/enum-rec/issue-17431-6.rs @@ -1,8 +1,6 @@ -//@ ignore-apple: cycle error does not appear on apple +use std::cell::UnsafeCell; -use std::sync::Mutex; - -enum Foo { X(Mutex<Option<Foo>>) } +enum Foo { X(UnsafeCell<Option<Foo>>) } //~^ ERROR recursive type `Foo` has infinite size //~| ERROR cycle detected diff --git a/tests/ui/structs-enums/enum-rec/issue-17431-6.stderr b/tests/ui/structs-enums/enum-rec/issue-17431-6.stderr index 22f8519d0ef..b192593d266 100644 --- a/tests/ui/structs-enums/enum-rec/issue-17431-6.stderr +++ b/tests/ui/structs-enums/enum-rec/issue-17431-6.stderr @@ -1,18 +1,18 @@ error[E0072]: recursive type `Foo` has infinite size - --> $DIR/issue-17431-6.rs:5:1 + --> $DIR/issue-17431-6.rs:3:1 | -LL | enum Foo { X(Mutex<Option<Foo>>) } - | ^^^^^^^^ --- recursive without indirection +LL | enum Foo { X(UnsafeCell<Option<Foo>>) } + | ^^^^^^^^ --- recursive without indirection | help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | -LL | enum Foo { X(Mutex<Option<Box<Foo>>>) } - | ++++ + +LL | enum Foo { X(UnsafeCell<Option<Box<Foo>>>) } + | ++++ + error[E0391]: cycle detected when computing when `Foo` needs drop - --> $DIR/issue-17431-6.rs:5:1 + --> $DIR/issue-17431-6.rs:3:1 | -LL | enum Foo { X(Mutex<Option<Foo>>) } +LL | enum Foo { X(UnsafeCell<Option<Foo>>) } | ^^^^^^^^ | = note: ...which immediately requires computing when `Foo` needs drop again diff --git a/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.rs b/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.rs index af47ba8baa3..1a440a90cd7 100644 --- a/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.rs +++ b/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.rs @@ -2,9 +2,9 @@ fn main() { let A = 3; //~^ ERROR refutable pattern in local binding //~| patterns `i32::MIN..=1_i32` and `3_i32..=i32::MAX` not covered - //~| missing patterns are not covered because `A` is interpreted as a constant pattern, not a new variable //~| HELP introduce a variable instead //~| SUGGESTION A_var const A: i32 = 2; + //~^ missing patterns are not covered because `A` is interpreted as a constant pattern, not a new variable } diff --git a/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr b/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr index b6c28612802..a275d8e4e83 100644 --- a/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr +++ b/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr @@ -2,15 +2,18 @@ error[E0005]: refutable pattern in local binding --> $DIR/const-pat-non-exaustive-let-new-var.rs:2:9 | LL | let A = 3; - | ^ - | | - | patterns `i32::MIN..=1_i32` and `3_i32..=i32::MAX` not covered - | missing patterns are not covered because `A` is interpreted as a constant pattern, not a new variable - | help: introduce a variable instead: `A_var` + | ^ patterns `i32::MIN..=1_i32` and `3_i32..=i32::MAX` not covered +... +LL | const A: i32 = 2; + | ------------ missing patterns are not covered because `A` is interpreted as a constant pattern, not a new variable | = 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: the matched value is of type `i32` +help: introduce a variable instead + | +LL | let A_var = 3; + | ~~~~~ error: aborting due to 1 previous error diff --git a/tests/ui/symbol-names/basic.rs b/tests/ui/symbol-names/basic.rs index dfcac21ccd6..839dda2b3a3 100644 --- a/tests/ui/symbol-names/basic.rs +++ b/tests/ui/symbol-names/basic.rs @@ -1,7 +1,7 @@ //@ build-fail //@ revisions: legacy v0 //@[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy - //@[v0]compile-flags: -C symbol-mangling-version=v0 +//@[v0]compile-flags: -C symbol-mangling-version=v0 #![feature(rustc_attrs)] diff --git a/tests/ui/symbol-names/impl1.rs b/tests/ui/symbol-names/impl1.rs index fa4be88f68f..9aefca47447 100644 --- a/tests/ui/symbol-names/impl1.rs +++ b/tests/ui/symbol-names/impl1.rs @@ -1,7 +1,7 @@ //@ build-fail //@ revisions: legacy v0 //@[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy - //@[v0]compile-flags: -C symbol-mangling-version=v0 +//@[v0]compile-flags: -C symbol-mangling-version=v0 //@[legacy]normalize-stderr-test: "h[\w]{16}E?\)" -> "<SYMBOL_HASH>)" #![feature(auto_traits, rustc_attrs)] diff --git a/tests/ui/symbol-names/issue-60925.rs b/tests/ui/symbol-names/issue-60925.rs index 9f1f007a0fa..ca0f21b7a78 100644 --- a/tests/ui/symbol-names/issue-60925.rs +++ b/tests/ui/symbol-names/issue-60925.rs @@ -1,7 +1,7 @@ //@ build-fail //@ revisions: legacy v0 //@[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy - //@[v0]compile-flags: -C symbol-mangling-version=v0 +//@[v0]compile-flags: -C symbol-mangling-version=v0 #![feature(rustc_attrs)] diff --git a/tests/ui/thir-print/thir-flat-const-variant.stdout b/tests/ui/thir-print/thir-flat-const-variant.stdout index 1840be7885b..5588cfdfa5c 100644 --- a/tests/ui/thir-print/thir-flat-const-variant.stdout +++ b/tests/ui/thir-print/thir-flat-const-variant.stdout @@ -11,9 +11,12 @@ Thir { fields: [], }, ty: (), - temp_lifetime: Some( - Node(3), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(3), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat-const-variant.rs:12:32: 12:34 (#0), }, Expr { @@ -25,9 +28,12 @@ Thir { value: e0, }, ty: (), - temp_lifetime: Some( - Node(3), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(3), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat-const-variant.rs:12:32: 12:34 (#0), }, Expr { @@ -47,9 +53,12 @@ Thir { }, ), ty: Foo, - temp_lifetime: Some( - Node(3), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(3), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat-const-variant.rs:12:23: 12:35 (#0), }, Expr { @@ -61,9 +70,12 @@ Thir { value: e2, }, ty: Foo, - temp_lifetime: Some( - Node(3), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(3), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat-const-variant.rs:12:23: 12:35 (#0), }, ], @@ -84,9 +96,12 @@ Thir { fields: [], }, ty: (), - temp_lifetime: Some( - Node(3), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(3), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat-const-variant.rs:13:33: 13:35 (#0), }, Expr { @@ -98,9 +113,12 @@ Thir { value: e0, }, ty: (), - temp_lifetime: Some( - Node(3), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(3), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat-const-variant.rs:13:33: 13:35 (#0), }, Expr { @@ -120,9 +138,12 @@ Thir { }, ), ty: Foo, - temp_lifetime: Some( - Node(3), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(3), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat-const-variant.rs:13:23: 13:36 (#0), }, Expr { @@ -134,9 +155,12 @@ Thir { value: e2, }, ty: Foo, - temp_lifetime: Some( - Node(3), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(3), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat-const-variant.rs:13:23: 13:36 (#0), }, ], @@ -157,9 +181,12 @@ Thir { fields: [], }, ty: (), - temp_lifetime: Some( - Node(3), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(3), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat-const-variant.rs:14:33: 14:35 (#0), }, Expr { @@ -171,9 +198,12 @@ Thir { value: e0, }, ty: (), - temp_lifetime: Some( - Node(3), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(3), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat-const-variant.rs:14:33: 14:35 (#0), }, Expr { @@ -193,9 +223,12 @@ Thir { }, ), ty: Foo, - temp_lifetime: Some( - Node(3), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(3), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat-const-variant.rs:14:24: 14:36 (#0), }, Expr { @@ -207,9 +240,12 @@ Thir { value: e2, }, ty: Foo, - temp_lifetime: Some( - Node(3), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(3), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat-const-variant.rs:14:24: 14:36 (#0), }, ], @@ -230,9 +266,12 @@ Thir { fields: [], }, ty: (), - temp_lifetime: Some( - Node(3), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(3), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat-const-variant.rs:15:34: 15:36 (#0), }, Expr { @@ -244,9 +283,12 @@ Thir { value: e0, }, ty: (), - temp_lifetime: Some( - Node(3), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(3), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat-const-variant.rs:15:34: 15:36 (#0), }, Expr { @@ -266,9 +308,12 @@ Thir { }, ), ty: Foo, - temp_lifetime: Some( - Node(3), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(3), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat-const-variant.rs:15:24: 15:37 (#0), }, Expr { @@ -280,9 +325,12 @@ Thir { value: e2, }, ty: Foo, - temp_lifetime: Some( - Node(3), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(3), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat-const-variant.rs:15:24: 15:37 (#0), }, ], @@ -312,9 +360,12 @@ Thir { block: b0, }, ty: (), - temp_lifetime: Some( - Node(2), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(2), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat-const-variant.rs:18:11: 18:13 (#0), }, Expr { @@ -326,9 +377,12 @@ Thir { value: e0, }, ty: (), - temp_lifetime: Some( - Node(2), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(2), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat-const-variant.rs:18:11: 18:13 (#0), }, ], diff --git a/tests/ui/thir-print/thir-flat.stdout b/tests/ui/thir-print/thir-flat.stdout index a31d08adab6..59cecfe511c 100644 --- a/tests/ui/thir-print/thir-flat.stdout +++ b/tests/ui/thir-print/thir-flat.stdout @@ -20,9 +20,12 @@ Thir { block: b0, }, ty: (), - temp_lifetime: Some( - Node(2), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(2), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat.rs:4:15: 4:17 (#0), }, Expr { @@ -34,9 +37,12 @@ Thir { value: e0, }, ty: (), - temp_lifetime: Some( - Node(2), - ), + temp_lifetime: TempLifetime { + temp_lifetime: Some( + Node(2), + ), + backwards_incompatible: None, + }, span: $DIR/thir-flat.rs:4:15: 4:17 (#0), }, ], diff --git a/tests/ui/thir-print/thir-tree-match.stdout b/tests/ui/thir-print/thir-tree-match.stdout index 8cff7887661..a9d6985928a 100644 --- a/tests/ui/thir-print/thir-tree-match.stdout +++ b/tests/ui/thir-print/thir-tree-match.stdout @@ -26,7 +26,7 @@ params: [ body: Expr { ty: bool - temp_lifetime: Some(Node(26)) + temp_lifetime: TempLifetime { temp_lifetime: Some(Node(26)), backwards_incompatible: None } span: $DIR/thir-tree-match.rs:15:32: 21:2 (#0) kind: Scope { @@ -35,7 +35,7 @@ body: value: Expr { ty: bool - temp_lifetime: Some(Node(26)) + temp_lifetime: TempLifetime { temp_lifetime: Some(Node(26)), backwards_incompatible: None } span: $DIR/thir-tree-match.rs:15:32: 21:2 (#0) kind: Block { @@ -47,7 +47,7 @@ body: expr: Expr { ty: bool - temp_lifetime: Some(Node(26)) + temp_lifetime: TempLifetime { temp_lifetime: Some(Node(26)), backwards_incompatible: None } span: $DIR/thir-tree-match.rs:16:5: 20:6 (#0) kind: Scope { @@ -56,14 +56,14 @@ body: value: Expr { ty: bool - temp_lifetime: Some(Node(26)) + temp_lifetime: TempLifetime { temp_lifetime: Some(Node(26)), backwards_incompatible: None } span: $DIR/thir-tree-match.rs:16:5: 20:6 (#0) kind: Match { scrutinee: Expr { ty: Foo - temp_lifetime: Some(Node(26)) + temp_lifetime: TempLifetime { temp_lifetime: Some(Node(26)), backwards_incompatible: None } span: $DIR/thir-tree-match.rs:16:11: 16:14 (#0) kind: Scope { @@ -72,7 +72,7 @@ body: value: Expr { ty: Foo - temp_lifetime: Some(Node(26)) + temp_lifetime: TempLifetime { temp_lifetime: Some(Node(26)), backwards_incompatible: None } span: $DIR/thir-tree-match.rs:16:11: 16:14 (#0) kind: VarRef { @@ -123,7 +123,7 @@ body: body: Expr { ty: bool - temp_lifetime: Some(Node(13)) + temp_lifetime: TempLifetime { temp_lifetime: Some(Node(13)), backwards_incompatible: None } span: $DIR/thir-tree-match.rs:17:36: 17:40 (#0) kind: Scope { @@ -132,7 +132,7 @@ body: value: Expr { ty: bool - temp_lifetime: Some(Node(13)) + temp_lifetime: TempLifetime { temp_lifetime: Some(Node(13)), backwards_incompatible: None } span: $DIR/thir-tree-match.rs:17:36: 17:40 (#0) kind: Literal( lit: Spanned { node: Bool(true), span: $DIR/thir-tree-match.rs:17:36: 17:40 (#0) }, neg: false) @@ -175,7 +175,7 @@ body: body: Expr { ty: bool - temp_lifetime: Some(Node(19)) + temp_lifetime: TempLifetime { temp_lifetime: Some(Node(19)), backwards_incompatible: None } span: $DIR/thir-tree-match.rs:18:27: 18:32 (#0) kind: Scope { @@ -184,7 +184,7 @@ body: value: Expr { ty: bool - temp_lifetime: Some(Node(19)) + temp_lifetime: TempLifetime { temp_lifetime: Some(Node(19)), backwards_incompatible: None } span: $DIR/thir-tree-match.rs:18:27: 18:32 (#0) kind: Literal( lit: Spanned { node: Bool(false), span: $DIR/thir-tree-match.rs:18:27: 18:32 (#0) }, neg: false) @@ -219,7 +219,7 @@ body: body: Expr { ty: bool - temp_lifetime: Some(Node(24)) + temp_lifetime: TempLifetime { temp_lifetime: Some(Node(24)), backwards_incompatible: None } span: $DIR/thir-tree-match.rs:19:24: 19:28 (#0) kind: Scope { @@ -228,7 +228,7 @@ body: value: Expr { ty: bool - temp_lifetime: Some(Node(24)) + temp_lifetime: TempLifetime { temp_lifetime: Some(Node(24)), backwards_incompatible: None } span: $DIR/thir-tree-match.rs:19:24: 19:28 (#0) kind: Literal( lit: Spanned { node: Bool(true), span: $DIR/thir-tree-match.rs:19:24: 19:28 (#0) }, neg: false) @@ -257,7 +257,7 @@ params: [ body: Expr { ty: () - temp_lifetime: Some(Node(2)) + temp_lifetime: TempLifetime { temp_lifetime: Some(Node(2)), backwards_incompatible: None } span: $DIR/thir-tree-match.rs:23:11: 23:13 (#0) kind: Scope { @@ -266,7 +266,7 @@ body: value: Expr { ty: () - temp_lifetime: Some(Node(2)) + temp_lifetime: TempLifetime { temp_lifetime: Some(Node(2)), backwards_incompatible: None } span: $DIR/thir-tree-match.rs:23:11: 23:13 (#0) kind: Block { diff --git a/tests/ui/thir-print/thir-tree.stdout b/tests/ui/thir-print/thir-tree.stdout index ef6db368dbe..b39581ad841 100644 --- a/tests/ui/thir-print/thir-tree.stdout +++ b/tests/ui/thir-print/thir-tree.stdout @@ -4,7 +4,7 @@ params: [ body: Expr { ty: () - temp_lifetime: Some(Node(2)) + temp_lifetime: TempLifetime { temp_lifetime: Some(Node(2)), backwards_incompatible: None } span: $DIR/thir-tree.rs:4:15: 4:17 (#0) kind: Scope { @@ -13,7 +13,7 @@ body: value: Expr { ty: () - temp_lifetime: Some(Node(2)) + temp_lifetime: TempLifetime { temp_lifetime: Some(Node(2)), backwards_incompatible: None } span: $DIR/thir-tree.rs:4:15: 4:17 (#0) kind: Block { diff --git a/tests/ui/trait-bounds/maybe-bound-has-path-args.rs b/tests/ui/trait-bounds/maybe-bound-has-path-args.rs index 2cb63f25d06..fd0e9691700 100644 --- a/tests/ui/trait-bounds/maybe-bound-has-path-args.rs +++ b/tests/ui/trait-bounds/maybe-bound-has-path-args.rs @@ -1,7 +1,7 @@ trait Trait {} fn test<T: ?self::<i32>::Trait>() {} -//~^ ERROR type arguments are not allowed on this type +//~^ ERROR type arguments are not allowed on module `maybe_bound_has_path_args` //~| WARN relaxing a default bound only does something for `?Sized` fn main() {} diff --git a/tests/ui/trait-bounds/maybe-bound-has-path-args.stderr b/tests/ui/trait-bounds/maybe-bound-has-path-args.stderr index 701e493f5a5..0c167fff940 100644 --- a/tests/ui/trait-bounds/maybe-bound-has-path-args.stderr +++ b/tests/ui/trait-bounds/maybe-bound-has-path-args.stderr @@ -4,13 +4,13 @@ warning: relaxing a default bound only does something for `?Sized`; all other tr LL | fn test<T: ?self::<i32>::Trait>() {} | ^^^^^^^^^^^^^^^^^^^ -error[E0109]: type arguments are not allowed on this type +error[E0109]: type arguments are not allowed on module `maybe_bound_has_path_args` --> $DIR/maybe-bound-has-path-args.rs:3:20 | LL | fn test<T: ?self::<i32>::Trait>() {} | ---- ^^^ type argument not allowed | | - | not allowed on this type + | not allowed on module `maybe_bound_has_path_args` error: aborting due to 1 previous error; 1 warning emitted diff --git a/tests/ui/traits/const-traits/const-closure-parse-not-item.stderr b/tests/ui/traits/const-traits/const-closure-parse-not-item.stderr index 25c81ff900f..0970cd5225f 100644 --- a/tests/ui/traits/const-traits/const-closure-parse-not-item.stderr +++ b/tests/ui/traits/const-traits/const-closure-parse-not-item.stderr @@ -12,5 +12,13 @@ LL | const fn test() -> impl ~const Fn() { | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: aborting due to 2 previous errors +error: `~const` can only be applied to `#[const_trait]` traits + --> $DIR/const-closure-parse-not-item.rs:7:25 + | +LL | const fn test() -> impl ~const Fn() { + | ^^^^^^ + | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` + +error: aborting due to 3 previous errors diff --git a/tests/ui/traits/const-traits/const-fns-are-early-bound.rs b/tests/ui/traits/const-traits/const-fns-are-early-bound.rs deleted file mode 100644 index c26eaf67454..00000000000 --- a/tests/ui/traits/const-traits/const-fns-are-early-bound.rs +++ /dev/null @@ -1,90 +0,0 @@ -//@ known-bug: #110395 -//@ failure-status: 101 -//@ dont-check-compiler-stderr -// FIXME(const_trait_impl) check-pass -//@ compile-flags: -Znext-solver - -#![crate_type = "lib"] -#![allow(internal_features, incomplete_features)] -#![no_std] -#![no_core] -#![feature( - auto_traits, - const_trait_impl, - effects, - lang_items, - no_core, - staged_api, - unboxed_closures, - rustc_attrs, - marker_trait_attr, -)] -#![stable(feature = "minicore", since = "1.0.0")] - -fn test() { - fn is_const_fn<F>(_: F) - where - F: const FnOnce<()>, - { - } - - const fn foo() {} - - is_const_fn(foo); -} - -/// ---------------------------------------------------------------------- /// -/// Const fn trait definitions - -#[const_trait] -#[lang = "fn"] -#[rustc_paren_sugar] -trait Fn<Args: Tuple>: ~const FnMut<Args> { - extern "rust-call" fn call(&self, args: Args) -> Self::Output; -} - -#[const_trait] -#[lang = "fn_mut"] -#[rustc_paren_sugar] -trait FnMut<Args: Tuple>: ~const FnOnce<Args> { - extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output; -} - -#[const_trait] -#[lang = "fn_once"] -#[rustc_paren_sugar] -trait FnOnce<Args: Tuple> { - #[lang = "fn_once_output"] - type Output; - - extern "rust-call" fn call_once(self, args: Args) -> Self::Output; -} - -/// ---------------------------------------------------------------------- /// -/// All this other stuff needed for core. Unrelated to test. - -#[lang = "destruct"] -#[const_trait] -trait Destruct {} - -#[lang = "freeze"] -unsafe auto trait Freeze {} - -#[lang = "drop"] -#[const_trait] -trait Drop { - fn drop(&mut self); -} - -#[lang = "sized"] -trait Sized {} -#[lang = "copy"] -trait Copy {} - -#[lang = "tuple_trait"] -trait Tuple {} - -#[lang = "legacy_receiver"] -trait LegacyReceiver {} - -impl<T: ?Sized> LegacyReceiver for &T {} diff --git a/tests/ui/traits/const-traits/const-opaque.no.stderr b/tests/ui/traits/const-traits/const-opaque.no.stderr new file mode 100644 index 00000000000..e43a6b603fd --- /dev/null +++ b/tests/ui/traits/const-traits/const-opaque.no.stderr @@ -0,0 +1,15 @@ +error[E0277]: the trait bound `(): const Foo` is not satisfied + --> $DIR/const-opaque.rs:31:18 + | +LL | let opaque = bar(()); + | ^^^^^^^ + +error[E0277]: the trait bound `(): const Foo` is not satisfied + --> $DIR/const-opaque.rs:33:5 + | +LL | opaque.method(); + | ^^^^^^^^^^^^^^^ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/traits/const-traits/const-opaque.rs b/tests/ui/traits/const-traits/const-opaque.rs new file mode 100644 index 00000000000..96cdd7d9f26 --- /dev/null +++ b/tests/ui/traits/const-traits/const-opaque.rs @@ -0,0 +1,38 @@ +//@ revisions: yes no +//@ compile-flags: -Znext-solver +//@[yes] check-pass + +#![feature(const_trait_impl)] + +#[const_trait] +trait Foo { + fn method(&self); +} + +impl<T: ~const Foo> const Foo for (T,) { + fn method(&self) {} +} + +#[cfg(yes)] +impl const Foo for () { + fn method(&self) {} +} + +#[cfg(no)] +impl Foo for () { + fn method(&self) {} +} + +const fn bar<T: ~const Foo>(t: T) -> impl ~const Foo { + (t,) +} + +const _: () = { + let opaque = bar(()); + //[no]~^ ERROR the trait bound `(): const Foo` is not satisfied + opaque.method(); + //[no]~^ ERROR the trait bound `(): const Foo` is not satisfied + std::mem::forget(opaque); +}; + +fn main() {} diff --git a/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.rs b/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.rs index c467088ab3d..8ff15dd09cc 100644 --- a/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.rs +++ b/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.rs @@ -3,6 +3,7 @@ const fn test() -> impl ~const Fn() { //~^ ERROR `~const` can only be applied to `#[const_trait]` traits //~| ERROR `~const` can only be applied to `#[const_trait]` traits + //~| ERROR `~const` can only be applied to `#[const_trait]` traits const move || { //~ ERROR const closures are experimental let sl: &[u8] = b"foo"; diff --git a/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.stderr b/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.stderr index 6d7edaf19f2..879d966b1f9 100644 --- a/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.stderr +++ b/tests/ui/traits/const-traits/effects/ice-112822-expected-type-for-param.stderr @@ -1,5 +1,5 @@ error[E0658]: const closures are experimental - --> $DIR/ice-112822-expected-type-for-param.rs:6:5 + --> $DIR/ice-112822-expected-type-for-param.rs:7:5 | LL | const move || { | ^^^^^ @@ -22,8 +22,16 @@ LL | const fn test() -> impl ~const Fn() { | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` +error: `~const` can only be applied to `#[const_trait]` traits + --> $DIR/ice-112822-expected-type-for-param.rs:3:25 + | +LL | const fn test() -> impl ~const Fn() { + | ^^^^^^ + | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` + error[E0015]: cannot call non-const operator in constant functions - --> $DIR/ice-112822-expected-type-for-param.rs:11:17 + --> $DIR/ice-112822-expected-type-for-param.rs:12:17 | LL | assert_eq!(first, &b'f'); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -32,7 +40,7 @@ LL | assert_eq!(first, &b'f'); = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0015]: cannot call non-const fn `core::panicking::assert_failed::<&u8, &u8>` in constant functions - --> $DIR/ice-112822-expected-type-for-param.rs:11:17 + --> $DIR/ice-112822-expected-type-for-param.rs:12:17 | LL | assert_eq!(first, &b'f'); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -40,7 +48,7 @@ LL | assert_eq!(first, &b'f'); = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to 5 previous errors +error: aborting due to 6 previous errors Some errors have detailed explanations: E0015, E0658. For more information about an error, try `rustc --explain E0015`. diff --git a/tests/ui/traits/const-traits/effects/minicore-const-fn-early-bound.rs b/tests/ui/traits/const-traits/effects/minicore-const-fn-early-bound.rs new file mode 100644 index 00000000000..ee47f92a0bc --- /dev/null +++ b/tests/ui/traits/const-traits/effects/minicore-const-fn-early-bound.rs @@ -0,0 +1,22 @@ +//@ aux-build:minicore.rs +//@ compile-flags: --crate-type=lib -Znext-solver -Cpanic=abort +//@ check-pass + +#![feature(no_core, const_trait_impl)] +#![no_std] +#![no_core] + +extern crate minicore; +use minicore::*; + +fn is_const_fn<F>(_: F) +where + F: const FnOnce(), +{ +} + +const fn foo() {} + +fn test() { + is_const_fn(foo); +} diff --git a/tests/ui/traits/const-traits/effects/minicore-fn-fail.rs b/tests/ui/traits/const-traits/effects/minicore-fn-fail.rs new file mode 100644 index 00000000000..ae1cbc6ca58 --- /dev/null +++ b/tests/ui/traits/const-traits/effects/minicore-fn-fail.rs @@ -0,0 +1,21 @@ +//@ aux-build:minicore.rs +//@ compile-flags: --crate-type=lib -Znext-solver + +#![feature(no_core, const_trait_impl)] +#![no_std] +#![no_core] + +extern crate minicore; +use minicore::*; + +const fn call_indirect<T: ~const Fn()>(t: &T) { t() } + +#[const_trait] +trait Foo {} +impl Foo for () {} +const fn foo<T: ~const Foo>() {} + +const fn test() { + call_indirect(&foo::<()>); + //~^ ERROR the trait bound `(): ~const Foo` is not satisfied +} diff --git a/tests/ui/traits/const-traits/effects/minicore-fn-fail.stderr b/tests/ui/traits/const-traits/effects/minicore-fn-fail.stderr new file mode 100644 index 00000000000..cf158643b34 --- /dev/null +++ b/tests/ui/traits/const-traits/effects/minicore-fn-fail.stderr @@ -0,0 +1,9 @@ +error[E0277]: the trait bound `(): ~const Foo` is not satisfied + --> $DIR/minicore-fn-fail.rs:19:5 + | +LL | call_indirect(&foo::<()>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/traits/const-traits/effects/minicore-works.rs b/tests/ui/traits/const-traits/effects/minicore-works.rs index bfbfa8b2d05..c79b4fc07df 100644 --- a/tests/ui/traits/const-traits/effects/minicore-works.rs +++ b/tests/ui/traits/const-traits/effects/minicore-works.rs @@ -20,3 +20,9 @@ const fn test_op() { let _x = Add::add(1, 2); let _y = Custom + Custom; } + +const fn call_indirect<T: ~const Fn()>(t: &T) { t() } + +const fn call() { + call_indirect(&call); +} diff --git a/tests/ui/traits/negative-bounds/on-unimplemented.rs b/tests/ui/traits/negative-bounds/on-unimplemented.rs index 34582590861..5f2a705ed56 100644 --- a/tests/ui/traits/negative-bounds/on-unimplemented.rs +++ b/tests/ui/traits/negative-bounds/on-unimplemented.rs @@ -1,3 +1,5 @@ +//@ reference: attributes.diagnostic.on_unimplemented.intro + #![feature(negative_bounds)] #[diagnostic::on_unimplemented(message = "this ain't fooing")] diff --git a/tests/ui/traits/negative-bounds/on-unimplemented.stderr b/tests/ui/traits/negative-bounds/on-unimplemented.stderr index ed473d57917..8a295611010 100644 --- a/tests/ui/traits/negative-bounds/on-unimplemented.stderr +++ b/tests/ui/traits/negative-bounds/on-unimplemented.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `NotFoo: !Foo` is not satisfied - --> $DIR/on-unimplemented.rs:7:15 + --> $DIR/on-unimplemented.rs:9:15 | LL | fn hello() -> impl !Foo { | ^^^^^^^^^ the trait bound `NotFoo: !Foo` is not satisfied diff --git a/tests/ui/type-alias-impl-trait/non-lifetime-binder-in-constraint.rs b/tests/ui/type-alias-impl-trait/non-lifetime-binder-in-constraint.rs index dda42580e0f..2a301788525 100644 --- a/tests/ui/type-alias-impl-trait/non-lifetime-binder-in-constraint.rs +++ b/tests/ui/type-alias-impl-trait/non-lifetime-binder-in-constraint.rs @@ -7,6 +7,7 @@ fn produce() -> impl for<T> Trait<(), Assoc = impl Trait<T>> { //~^ ERROR associated type `Assoc` not found for `Trait` //~| ERROR associated type `Assoc` not found for `Trait` //~| the trait bound `{integer}: Trait<()>` is not satisfied + //~| ERROR cannot capture late-bound type parameter in nested `impl Trait` 16 } diff --git a/tests/ui/type-alias-impl-trait/non-lifetime-binder-in-constraint.stderr b/tests/ui/type-alias-impl-trait/non-lifetime-binder-in-constraint.stderr index 6e5bd34ce38..38dcdbd0af2 100644 --- a/tests/ui/type-alias-impl-trait/non-lifetime-binder-in-constraint.stderr +++ b/tests/ui/type-alias-impl-trait/non-lifetime-binder-in-constraint.stderr @@ -1,3 +1,9 @@ +error: cannot capture late-bound type parameter in nested `impl Trait` + --> $DIR/non-lifetime-binder-in-constraint.rs:6:58 + | +LL | fn produce() -> impl for<T> Trait<(), Assoc = impl Trait<T>> { + | - parameter defined here ^ + error[E0220]: associated type `Assoc` not found for `Trait` --> $DIR/non-lifetime-binder-in-constraint.rs:6:39 | @@ -27,7 +33,7 @@ help: this trait has no implementations, consider adding one LL | trait Trait<T: ?Sized> {} | ^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 3 previous errors +error: aborting due to 4 previous errors Some errors have detailed explanations: E0220, E0277. For more information about an error, try `rustc --explain E0220`. diff --git a/tests/ui/type-alias-impl-trait/non-lifetime-binder.rs b/tests/ui/type-alias-impl-trait/non-lifetime-binder.rs index 23951c34270..23f3666618b 100644 --- a/tests/ui/type-alias-impl-trait/non-lifetime-binder.rs +++ b/tests/ui/type-alias-impl-trait/non-lifetime-binder.rs @@ -5,6 +5,7 @@ trait Trait<T> {} fn f() -> impl for<T> Trait<impl Trait<T>> {} //~^ ERROR nested `impl Trait` is not allowed -//~| ERROR the trait bound `(): Trait<impl Trait<T>>` is not satisfied +//~| ERROR the trait bound `(): Trait<impl Trait<{type error}>>` is not satisfied +//~| ERROR cannot capture late-bound type parameter in nested `impl Trait` fn main() {} diff --git a/tests/ui/type-alias-impl-trait/non-lifetime-binder.stderr b/tests/ui/type-alias-impl-trait/non-lifetime-binder.stderr index 5859d952b75..3c352c9889c 100644 --- a/tests/ui/type-alias-impl-trait/non-lifetime-binder.stderr +++ b/tests/ui/type-alias-impl-trait/non-lifetime-binder.stderr @@ -7,11 +7,19 @@ LL | fn f() -> impl for<T> Trait<impl Trait<T>> {} | | nested `impl Trait` here | outer `impl Trait` -error[E0277]: the trait bound `(): Trait<impl Trait<T>>` is not satisfied +error: cannot capture late-bound type parameter in nested `impl Trait` + --> $DIR/non-lifetime-binder.rs:6:40 + | +LL | fn f() -> impl for<T> Trait<impl Trait<T>> {} + | - ^ + | | + | parameter defined here + +error[E0277]: the trait bound `(): Trait<impl Trait<{type error}>>` is not satisfied --> $DIR/non-lifetime-binder.rs:6:11 | LL | fn f() -> impl for<T> Trait<impl Trait<T>> {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait<impl Trait<T>>` is not implemented for `()` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait<impl Trait<{type error}>>` is not implemented for `()` | help: this trait has no implementations, consider adding one --> $DIR/non-lifetime-binder.rs:4:1 @@ -19,7 +27,7 @@ help: this trait has no implementations, consider adding one LL | trait Trait<T> {} | ^^^^^^^^^^^^^^ -error: aborting due to 2 previous errors +error: aborting due to 3 previous errors Some errors have detailed explanations: E0277, E0666. For more information about an error, try `rustc --explain E0277`. diff --git a/tests/ui/unsafe/unsafe-block-without-braces.stderr b/tests/ui/unsafe/unsafe-block-without-braces.stderr index d29e49d73a6..3d8234c15e7 100644 --- a/tests/ui/unsafe/unsafe-block-without-braces.stderr +++ b/tests/ui/unsafe/unsafe-block-without-braces.stderr @@ -6,7 +6,7 @@ LL | unsafe //{ LL | std::mem::transmute::<f32, u32>(1.0); | ^^^ expected `{` | -help: try placing this code inside a block +help: you might have meant to write this as part of a block | LL | { std::mem::transmute::<f32, u32>(1.0); } | + + |
