diff options
| author | Kivooeo <Kivooeo123@gmail.com> | 2025-07-24 17:22:54 +0500 |
|---|---|---|
| committer | Kivooeo <Kivooeo123@gmail.com> | 2025-07-31 21:25:49 +0500 |
| commit | a4a5bf5a71bd0c3fb52a28f81d88ce1755b3bc30 (patch) | |
| tree | b69177434a4026599cbd602cc2aee39759f89cdd /tests | |
| parent | d636a6590ce1429ff011e04bb0b4d393dc382226 (diff) | |
| download | rust-a4a5bf5a71bd0c3fb52a28f81d88ce1755b3bc30.tar.gz rust-a4a5bf5a71bd0c3fb52a28f81d88ce1755b3bc30.zip | |
comments
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/autoref-autoderef/deref-chain-method-calls-13264.rs (renamed from tests/ui/traits/deref-chain-method-calls.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/block-result/blocks-without-results-11709.rs (renamed from tests/ui/block-result/blocks-without-results.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/borrowck/moved-value-in-thread-loop-12041.rs (renamed from tests/ui/threads/moved-value-in-thread-loop.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/borrowck/moved-value-in-thread-loop-12041.stderr (renamed from tests/ui/issues/issue-12041.stderr) | 2 | ||||
| -rw-r--r-- | tests/ui/borrowck/refcell-borrow-comparison-12033.rs (renamed from tests/ui/borrowck/refcell-borrow-comparison.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/borrowck/string-literal-match-patterns-11869.rs (renamed from tests/ui/match/string-literal-match-patterns.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/closures/fnonce-moved-twice-12127.rs (renamed from tests/ui/closures/fnonce-moved-twice.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/closures/fnonce-moved-twice-12127.stderr (renamed from tests/ui/issues/issue-12127.stderr) | 6 | ||||
| -rw-r--r-- | tests/ui/closures/moved-upvar-mut-rebind-11958.rs (renamed from tests/ui/closures/moved-upvar-mut-rebind.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/closures/moved-upvar-mut-rebind-11958.stderr (renamed from tests/ui/issues/issue-11958.stderr) | 4 | ||||
| -rw-r--r-- | tests/ui/coercion/any-trait-object-debug-12744.rs (renamed from tests/ui/traits/any-trait-object-debug.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/collections/hashset-connected-border-12860.rs (renamed from tests/ui/collections/hashset-connected-border.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/const-generics/vec-macro-in-static-array.rs | 2 | ||||
| -rw-r--r-- | tests/ui/const-generics/vec-macro-in-static-array.stderr (renamed from tests/ui/issues/issue-13446.stderr) | 2 | ||||
| -rw-r--r-- | tests/ui/extern/format-message-windows-ffi.rs | 39 | ||||
| -rw-r--r-- | tests/ui/extern/windows-tcb-trash-13259.rs | 49 | ||||
| -rw-r--r-- | tests/ui/fn/anonymous-parameters-trait-13105.rs (renamed from tests/ui/fn/anonymous-parameters-trait.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/iterators/bytes-iterator-clone-12677.rs (renamed from tests/ui/iterators/bytes-iterator-clone.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/lifetimes/iterator-trait-lifetime-error-13058.rs (renamed from tests/ui/lifetimes/iterator-trait-lifetime-error.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/lifetimes/iterator-trait-lifetime-error-13058.stderr (renamed from tests/ui/issues/issue-13058.stderr) | 2 | ||||
| -rw-r--r-- | tests/ui/lifetimes/lifetime-inference-destructuring-arg.rs (renamed from tests/ui/iterators/phf-map-entries-iterator.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/lifetimes/matcher-trait-equality-13323.rs (renamed from tests/ui/traits/matcher-trait-equality.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/lifetimes/struct-lifetime-field-assignment-13405.rs (renamed from tests/ui/lifetimes/struct-lifetime-field-assignment.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/lifetimes/unsafe-transmute-in-find-11740.rs (renamed from tests/ui/unsafe/unsafe-transmute-in-find.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/match/option-result-mismatch-11844.rs (renamed from tests/ui/match/option-result-mismatch.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/match/option-result-mismatch-11844.stderr (renamed from tests/ui/issues/issue-11844.stderr) | 2 | ||||
| -rw-r--r-- | tests/ui/match/option-result-type-param-mismatch-13466.rs (renamed from tests/ui/match/option-result-type-param-mismatch.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/match/option-result-type-param-mismatch-13466.stderr (renamed from tests/ui/issues/issue-13466.stderr) | 4 | ||||
| -rw-r--r-- | tests/ui/match/overeager-sub-match-pruning-13027.rs (renamed from tests/ui/match/guard-literal-range-shadow.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/match/slice-move-out-error-12567.rs (renamed from tests/ui/match/slice-move-out-error.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/match/slice-move-out-error-12567.stderr (renamed from tests/ui/issues/issue-12567.stderr) | 4 | ||||
| -rw-r--r-- | tests/ui/match/struct-reference-patterns-12285.rs (renamed from tests/ui/match/struct-reference-patterns.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/parser/encode-symbol-ice-12920.rs (renamed from tests/ui/panics/explicit-panic-unreachable.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/privacy/private-unit-struct-assignment.rs | 2 | ||||
| -rw-r--r-- | tests/ui/privacy/private-unit-struct-assignment.stderr (renamed from tests/ui/issues/issue-13407.stderr) | 6 | ||||
| -rw-r--r-- | tests/ui/privacy/use-in-impl-scope-12729.rs (renamed from tests/ui/imports/use-in-impl-scope.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/resolve/reference-clone-nonclone-11820.rs (renamed from tests/ui/traits/reference-clone-noclone.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/statics/enum-with-static-str-variant-13214.rs (renamed from tests/ui/statics/enum-with-static-str-variant.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/traits/default-method-lifetime-params-13204.rs (renamed from tests/ui/traits/default-method-lifetime-params.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/traits/fnonce-repro-trait-impl-13434.rs (renamed from tests/ui/traits/fnonce-repro-trait-impl.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/type-inference/partial-type-hint-12909.rs (renamed from tests/ui/type-inference/type-collect-inference.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/typeck/function-in-pattern-error-12863.rs (renamed from tests/ui/match/function-in-pattern-error.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/typeck/function-in-pattern-error-12863.stderr (renamed from tests/ui/issues/issue-12863.stderr) | 2 | ||||
| -rw-r--r-- | tests/ui/typeck/isize-usize-mismatch-error.rs (renamed from tests/ui/type-inference/isize-usize-mismatch-error.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/typeck/isize-usize-mismatch-error.stderr (renamed from tests/ui/issues/issue-13359.stderr) | 8 | ||||
| -rw-r--r-- | tests/ui/typeck/unit-type-add-error-11771.rs (renamed from tests/ui/type-inference/unit-type-add-error.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/typeck/unit-type-add-error-11771.stderr (renamed from tests/ui/issues/issue-11771.stderr) | 4 | ||||
| -rw-r--r-- | tests/ui/typeck/unwrap-or-panic-input-13202.rs (renamed from tests/ui/panics/unwrap-or-panic-input.rs) | 2 |
48 files changed, 140 insertions, 62 deletions
diff --git a/tests/ui/traits/deref-chain-method-calls.rs b/tests/ui/autoref-autoderef/deref-chain-method-calls-13264.rs index bf4ec388c4f..f471c1c7eef 100644 --- a/tests/ui/traits/deref-chain-method-calls.rs +++ b/tests/ui/autoref-autoderef/deref-chain-method-calls-13264.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/13264 + //@ run-pass #![allow(non_camel_case_types)] #![allow(non_snake_case)] diff --git a/tests/ui/block-result/blocks-without-results.rs b/tests/ui/block-result/blocks-without-results-11709.rs index 8a11074eca8..97ea6f9e19e 100644 --- a/tests/ui/block-result/blocks-without-results.rs +++ b/tests/ui/block-result/blocks-without-results-11709.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/11709 + //@ run-pass #![allow(dead_code)] diff --git a/tests/ui/threads/moved-value-in-thread-loop.rs b/tests/ui/borrowck/moved-value-in-thread-loop-12041.rs index 091e8fe8b2a..98f9cdbdef7 100644 --- a/tests/ui/threads/moved-value-in-thread-loop.rs +++ b/tests/ui/borrowck/moved-value-in-thread-loop-12041.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/12041 + use std::sync::mpsc::channel; use std::thread; diff --git a/tests/ui/issues/issue-12041.stderr b/tests/ui/borrowck/moved-value-in-thread-loop-12041.stderr index f2c10b83383..627dd193dad 100644 --- a/tests/ui/issues/issue-12041.stderr +++ b/tests/ui/borrowck/moved-value-in-thread-loop-12041.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `tx` - --> $DIR/issue-12041.rs:8:22 + --> $DIR/moved-value-in-thread-loop-12041.rs:10:22 | LL | let tx = tx; | ^^ value moved here, in previous iteration of loop diff --git a/tests/ui/borrowck/refcell-borrow-comparison.rs b/tests/ui/borrowck/refcell-borrow-comparison-12033.rs index 0bf6490bafe..de22cedd5b9 100644 --- a/tests/ui/borrowck/refcell-borrow-comparison.rs +++ b/tests/ui/borrowck/refcell-borrow-comparison-12033.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/12033 + //@ run-pass use std::cell::RefCell; diff --git a/tests/ui/match/string-literal-match-patterns.rs b/tests/ui/borrowck/string-literal-match-patterns-11869.rs index dd752227bbe..4c159e457cf 100644 --- a/tests/ui/match/string-literal-match-patterns.rs +++ b/tests/ui/borrowck/string-literal-match-patterns-11869.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/11869 + //@ check-pass #![allow(dead_code)] diff --git a/tests/ui/closures/fnonce-moved-twice.rs b/tests/ui/closures/fnonce-moved-twice-12127.rs index 199d542e816..369ddcafaab 100644 --- a/tests/ui/closures/fnonce-moved-twice.rs +++ b/tests/ui/closures/fnonce-moved-twice-12127.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/12127 + #![feature(unboxed_closures, tuple_trait)] fn to_fn_once<A:std::marker::Tuple,F:FnOnce<A>>(f: F) -> F { f } diff --git a/tests/ui/issues/issue-12127.stderr b/tests/ui/closures/fnonce-moved-twice-12127.stderr index 2a6233547ee..c2e12827527 100644 --- a/tests/ui/issues/issue-12127.stderr +++ b/tests/ui/closures/fnonce-moved-twice-12127.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `f` - --> $DIR/issue-12127.rs:11:9 + --> $DIR/fnonce-moved-twice-12127.rs:13:9 | LL | f(); | --- `f` moved due to this call @@ -7,11 +7,11 @@ LL | f(); | ^ value used here after move | note: this value implements `FnOnce`, which causes it to be moved when called - --> $DIR/issue-12127.rs:10:9 + --> $DIR/fnonce-moved-twice-12127.rs:12:9 | LL | f(); | ^ - = note: move occurs because `f` has type `{closure@$DIR/issue-12127.rs:8:24: 8:30}`, which does not implement the `Copy` trait + = note: move occurs because `f` has type `{closure@$DIR/fnonce-moved-twice-12127.rs:10:24: 10:30}`, which does not implement the `Copy` trait error: aborting due to 1 previous error diff --git a/tests/ui/closures/moved-upvar-mut-rebind.rs b/tests/ui/closures/moved-upvar-mut-rebind-11958.rs index 9185c5158af..701dc1a2cef 100644 --- a/tests/ui/closures/moved-upvar-mut-rebind.rs +++ b/tests/ui/closures/moved-upvar-mut-rebind-11958.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/11958 + //@ run-pass // We shouldn't need to rebind a moved upvar as mut if it's already diff --git a/tests/ui/issues/issue-11958.stderr b/tests/ui/closures/moved-upvar-mut-rebind-11958.stderr index 5dca4c2f01d..b12bbcad925 100644 --- a/tests/ui/issues/issue-11958.stderr +++ b/tests/ui/closures/moved-upvar-mut-rebind-11958.stderr @@ -1,5 +1,5 @@ warning: value assigned to `x` is never read - --> $DIR/issue-11958.rs:8:36 + --> $DIR/moved-upvar-mut-rebind-11958.rs:10:36 | LL | let _thunk = Box::new(move|| { x = 2; }); | ^ @@ -8,7 +8,7 @@ LL | let _thunk = Box::new(move|| { x = 2; }); = note: `#[warn(unused_assignments)]` on by default warning: unused variable: `x` - --> $DIR/issue-11958.rs:8:36 + --> $DIR/moved-upvar-mut-rebind-11958.rs:10:36 | LL | let _thunk = Box::new(move|| { x = 2; }); | ^ diff --git a/tests/ui/traits/any-trait-object-debug.rs b/tests/ui/coercion/any-trait-object-debug-12744.rs index eaf92d413d5..4d981c077ee 100644 --- a/tests/ui/traits/any-trait-object-debug.rs +++ b/tests/ui/coercion/any-trait-object-debug-12744.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/12744 + //@ run-pass fn main() { fn test() -> Box<dyn std::any::Any + 'static> { Box::new(1) } diff --git a/tests/ui/collections/hashset-connected-border.rs b/tests/ui/collections/hashset-connected-border-12860.rs index 255f6670793..40185bef7c8 100644 --- a/tests/ui/collections/hashset-connected-border.rs +++ b/tests/ui/collections/hashset-connected-border-12860.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/12860 + //@ run-pass use std::collections::HashSet; diff --git a/tests/ui/const-generics/vec-macro-in-static-array.rs b/tests/ui/const-generics/vec-macro-in-static-array.rs index 9f1fc42774f..7a81836e255 100644 --- a/tests/ui/const-generics/vec-macro-in-static-array.rs +++ b/tests/ui/const-generics/vec-macro-in-static-array.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/13446 + // Used to cause ICE static VEC: [u32; 256] = vec![]; diff --git a/tests/ui/issues/issue-13446.stderr b/tests/ui/const-generics/vec-macro-in-static-array.stderr index 28c459e6e62..de21f2274f3 100644 --- a/tests/ui/issues/issue-13446.stderr +++ b/tests/ui/const-generics/vec-macro-in-static-array.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-13446.rs:3:26 + --> $DIR/vec-macro-in-static-array.rs:5:26 | LL | static VEC: [u32; 256] = vec![]; | ^^^^^^ expected `[u32; 256]`, found `Vec<_>` diff --git a/tests/ui/extern/format-message-windows-ffi.rs b/tests/ui/extern/format-message-windows-ffi.rs deleted file mode 100644 index 381e3f15259..00000000000 --- a/tests/ui/extern/format-message-windows-ffi.rs +++ /dev/null @@ -1,39 +0,0 @@ -//@ run-pass - -#[cfg(windows)] -mod imp { - type LPVOID = *mut u8; - type DWORD = u32; - type LPWSTR = *mut u16; - - extern "system" { - fn FormatMessageW(flags: DWORD, - lpSrc: LPVOID, - msgId: DWORD, - langId: DWORD, - buf: LPWSTR, - nsize: DWORD, - args: *const u8) - -> DWORD; - } - - pub fn test() { - let mut buf: [u16; 50] = [0; 50]; - let ret = unsafe { - FormatMessageW(0x1000, core::ptr::null_mut(), 1, 0x400, - buf.as_mut_ptr(), buf.len() as u32, core::ptr::null()) - }; - // On some 32-bit Windowses (Win7-8 at least) this will panic with segmented - // stacks taking control of pvArbitrary - assert!(ret != 0); - } -} - -#[cfg(not(windows))] -mod imp { - pub fn test() { } -} - -fn main() { - imp::test() -} diff --git a/tests/ui/extern/windows-tcb-trash-13259.rs b/tests/ui/extern/windows-tcb-trash-13259.rs new file mode 100644 index 00000000000..0852e31251a --- /dev/null +++ b/tests/ui/extern/windows-tcb-trash-13259.rs @@ -0,0 +1,49 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/13259 + +//@ run-pass + +#[cfg(windows)] +mod imp { + type LPVOID = *mut u8; + type DWORD = u32; + type LPWSTR = *mut u16; + + extern "system" { + fn FormatMessageW( + flags: DWORD, + lpSrc: LPVOID, + msgId: DWORD, + langId: DWORD, + buf: LPWSTR, + nsize: DWORD, + args: *const u8, + ) -> DWORD; + } + + pub fn test() { + let mut buf: [u16; 50] = [0; 50]; + let ret = unsafe { + FormatMessageW( + 0x1000, + core::ptr::null_mut(), + 1, + 0x400, + buf.as_mut_ptr(), + buf.len() as u32, + core::ptr::null(), + ) + }; + // On some 32-bit Windowses (Win7-8 at least) this will panic with segmented + // stacks taking control of pvArbitrary + assert!(ret != 0); + } +} + +#[cfg(not(windows))] +mod imp { + pub fn test() {} +} + +fn main() { + imp::test() +} diff --git a/tests/ui/fn/anonymous-parameters-trait.rs b/tests/ui/fn/anonymous-parameters-trait-13105.rs index d119aa9c788..171dab15fe7 100644 --- a/tests/ui/fn/anonymous-parameters-trait.rs +++ b/tests/ui/fn/anonymous-parameters-trait-13105.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/13105 + //@ edition: 2015 //@ check-pass diff --git a/tests/ui/iterators/bytes-iterator-clone.rs b/tests/ui/iterators/bytes-iterator-clone-12677.rs index dbc2dbc8527..cfbb85a3ecb 100644 --- a/tests/ui/iterators/bytes-iterator-clone.rs +++ b/tests/ui/iterators/bytes-iterator-clone-12677.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/12677 + //@ run-pass fn main() { diff --git a/tests/ui/lifetimes/iterator-trait-lifetime-error.rs b/tests/ui/lifetimes/iterator-trait-lifetime-error-13058.rs index a5806feb720..6cfe440b43d 100644 --- a/tests/ui/lifetimes/iterator-trait-lifetime-error.rs +++ b/tests/ui/lifetimes/iterator-trait-lifetime-error-13058.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/13058 + use std::ops::Range; trait Itble<'r, T, I: Iterator<Item=T>> { fn iter(&'r self) -> I; } diff --git a/tests/ui/issues/issue-13058.stderr b/tests/ui/lifetimes/iterator-trait-lifetime-error-13058.stderr index 4f4108fa182..e6564e36b21 100644 --- a/tests/ui/issues/issue-13058.stderr +++ b/tests/ui/lifetimes/iterator-trait-lifetime-error-13058.stderr @@ -1,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `cont` - --> $DIR/issue-13058.rs:14:21 + --> $DIR/iterator-trait-lifetime-error-13058.rs:16:21 | LL | let cont_iter = cont.iter(); | ^^^^^^^^^^^ lifetime `'r` required diff --git a/tests/ui/iterators/phf-map-entries-iterator.rs b/tests/ui/lifetimes/lifetime-inference-destructuring-arg.rs index 5f733e85948..7a019a71d75 100644 --- a/tests/ui/iterators/phf-map-entries-iterator.rs +++ b/tests/ui/lifetimes/lifetime-inference-destructuring-arg.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/13167 + //@ check-pass //@ revisions: current next //@ ignore-compare-mode-next-solver (explicit revisions) diff --git a/tests/ui/traits/matcher-trait-equality.rs b/tests/ui/lifetimes/matcher-trait-equality-13323.rs index 8f334404f9a..efd56294b39 100644 --- a/tests/ui/traits/matcher-trait-equality.rs +++ b/tests/ui/lifetimes/matcher-trait-equality-13323.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/13323 + //@ run-pass struct StrWrap { diff --git a/tests/ui/lifetimes/struct-lifetime-field-assignment.rs b/tests/ui/lifetimes/struct-lifetime-field-assignment-13405.rs index 80b298d2f37..9482d89681b 100644 --- a/tests/ui/lifetimes/struct-lifetime-field-assignment.rs +++ b/tests/ui/lifetimes/struct-lifetime-field-assignment-13405.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/13405 + //@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/unsafe/unsafe-transmute-in-find.rs b/tests/ui/lifetimes/unsafe-transmute-in-find-11740.rs index c6099c2a0c0..eeecd2e9e40 100644 --- a/tests/ui/unsafe/unsafe-transmute-in-find.rs +++ b/tests/ui/lifetimes/unsafe-transmute-in-find-11740.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/11740 + //@ check-pass struct Attr { diff --git a/tests/ui/match/option-result-mismatch.rs b/tests/ui/match/option-result-mismatch-11844.rs index f974a470296..24a2004134d 100644 --- a/tests/ui/match/option-result-mismatch.rs +++ b/tests/ui/match/option-result-mismatch-11844.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/11844 + fn main() { let a = Some(Box::new(1)); match a { diff --git a/tests/ui/issues/issue-11844.stderr b/tests/ui/match/option-result-mismatch-11844.stderr index 9ff66eaef49..8a84b7b8a48 100644 --- a/tests/ui/issues/issue-11844.stderr +++ b/tests/ui/match/option-result-mismatch-11844.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-11844.rs:4:9 + --> $DIR/option-result-mismatch-11844.rs:6:9 | LL | match a { | - this expression has type `Option<Box<{integer}>>` diff --git a/tests/ui/match/option-result-type-param-mismatch.rs b/tests/ui/match/option-result-type-param-mismatch-13466.rs index 78ce4c1d2f6..05dbdfdee0e 100644 --- a/tests/ui/match/option-result-type-param-mismatch.rs +++ b/tests/ui/match/option-result-type-param-mismatch-13466.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/13466 + // Regression test for #13466 //@ dont-require-annotations: NOTE diff --git a/tests/ui/issues/issue-13466.stderr b/tests/ui/match/option-result-type-param-mismatch-13466.stderr index 68a555a1626..b0cf1591f5e 100644 --- a/tests/ui/issues/issue-13466.stderr +++ b/tests/ui/match/option-result-type-param-mismatch-13466.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-13466.rs:10:9 + --> $DIR/option-result-type-param-mismatch-13466.rs:12:9 | LL | let _x: usize = match Some(1) { | ------- this expression has type `Option<{integer}>` @@ -10,7 +10,7 @@ LL | Ok(u) => u, found enum `Result<_, _>` error[E0308]: mismatched types - --> $DIR/issue-13466.rs:16:9 + --> $DIR/option-result-type-param-mismatch-13466.rs:18:9 | LL | let _x: usize = match Some(1) { | ------- this expression has type `Option<{integer}>` diff --git a/tests/ui/match/guard-literal-range-shadow.rs b/tests/ui/match/overeager-sub-match-pruning-13027.rs index fbd1d75067b..c4feb697f7d 100644 --- a/tests/ui/match/guard-literal-range-shadow.rs +++ b/tests/ui/match/overeager-sub-match-pruning-13027.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/13027 + //@ run-pass // Tests that match expression handles overlapped literal and range diff --git a/tests/ui/match/slice-move-out-error.rs b/tests/ui/match/slice-move-out-error-12567.rs index 1b2a37de475..3f9bf9c76cf 100644 --- a/tests/ui/match/slice-move-out-error.rs +++ b/tests/ui/match/slice-move-out-error-12567.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/12567 + fn match_vecs<'a, T>(l1: &'a [T], l2: &'a [T]) { match (l1, l2) { //~^ ERROR: cannot move out of type `[T]`, a non-copy slice diff --git a/tests/ui/issues/issue-12567.stderr b/tests/ui/match/slice-move-out-error-12567.stderr index 0b19299ece3..ab5377d4701 100644 --- a/tests/ui/issues/issue-12567.stderr +++ b/tests/ui/match/slice-move-out-error-12567.stderr @@ -1,5 +1,5 @@ error[E0508]: cannot move out of type `[T]`, a non-copy slice - --> $DIR/issue-12567.rs:2:11 + --> $DIR/slice-move-out-error-12567.rs:4:11 | LL | match (l1, l2) { | ^^^^^^^^ cannot move out of here @@ -23,7 +23,7 @@ LL + (&[hd1, ..], [hd2, ..]) | error[E0508]: cannot move out of type `[T]`, a non-copy slice - --> $DIR/issue-12567.rs:2:11 + --> $DIR/slice-move-out-error-12567.rs:4:11 | LL | match (l1, l2) { | ^^^^^^^^ cannot move out of here diff --git a/tests/ui/match/struct-reference-patterns.rs b/tests/ui/match/struct-reference-patterns-12285.rs index fe199147128..246e230b0de 100644 --- a/tests/ui/match/struct-reference-patterns.rs +++ b/tests/ui/match/struct-reference-patterns-12285.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/12285 + //@ run-pass struct S; diff --git a/tests/ui/panics/explicit-panic-unreachable.rs b/tests/ui/parser/encode-symbol-ice-12920.rs index f3b1b643c45..87389c0ffb4 100644 --- a/tests/ui/panics/explicit-panic-unreachable.rs +++ b/tests/ui/parser/encode-symbol-ice-12920.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/12920 + //@ run-fail //@ error-pattern:explicit panic //@ needs-subprocess diff --git a/tests/ui/privacy/private-unit-struct-assignment.rs b/tests/ui/privacy/private-unit-struct-assignment.rs index 7794be37b85..b8e1c4ecb18 100644 --- a/tests/ui/privacy/private-unit-struct-assignment.rs +++ b/tests/ui/privacy/private-unit-struct-assignment.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/13407 + mod A { struct C; } diff --git a/tests/ui/issues/issue-13407.stderr b/tests/ui/privacy/private-unit-struct-assignment.stderr index ac2eb6581fe..8c36a08846d 100644 --- a/tests/ui/issues/issue-13407.stderr +++ b/tests/ui/privacy/private-unit-struct-assignment.stderr @@ -1,17 +1,17 @@ error[E0603]: unit struct `C` is private - --> $DIR/issue-13407.rs:6:8 + --> $DIR/private-unit-struct-assignment.rs:8:8 | LL | A::C = 1; | ^ private unit struct | note: the unit struct `C` is defined here - --> $DIR/issue-13407.rs:2:5 + --> $DIR/private-unit-struct-assignment.rs:4:5 | LL | struct C; | ^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/issue-13407.rs:6:5 + --> $DIR/private-unit-struct-assignment.rs:8:5 | LL | struct C; | -------- unit struct defined here diff --git a/tests/ui/imports/use-in-impl-scope.rs b/tests/ui/privacy/use-in-impl-scope-12729.rs index 4d45846bc60..58fe042beec 100644 --- a/tests/ui/imports/use-in-impl-scope.rs +++ b/tests/ui/privacy/use-in-impl-scope-12729.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/12729 + //@ edition: 2015 //@ check-pass #![allow(dead_code)] diff --git a/tests/ui/traits/reference-clone-noclone.rs b/tests/ui/resolve/reference-clone-nonclone-11820.rs index ada844f8ee1..74dad96da94 100644 --- a/tests/ui/traits/reference-clone-noclone.rs +++ b/tests/ui/resolve/reference-clone-nonclone-11820.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/11820 + //@ run-pass #![allow(noop_method_call)] diff --git a/tests/ui/statics/enum-with-static-str-variant.rs b/tests/ui/statics/enum-with-static-str-variant-13214.rs index 8140ec943a0..1db37da632d 100644 --- a/tests/ui/statics/enum-with-static-str-variant.rs +++ b/tests/ui/statics/enum-with-static-str-variant-13214.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/13214 + //@ build-pass #![allow(dead_code)] // defining static with struct that contains enum diff --git a/tests/ui/traits/default-method-lifetime-params.rs b/tests/ui/traits/default-method-lifetime-params-13204.rs index 01362f6fe61..cdf34ab773c 100644 --- a/tests/ui/traits/default-method-lifetime-params.rs +++ b/tests/ui/traits/default-method-lifetime-params-13204.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/13204 + //@ run-pass #![allow(unused_mut)] // Test that when instantiating trait default methods, typeck handles diff --git a/tests/ui/traits/fnonce-repro-trait-impl.rs b/tests/ui/traits/fnonce-repro-trait-impl-13434.rs index caf7b632393..61d5a1d74ae 100644 --- a/tests/ui/traits/fnonce-repro-trait-impl.rs +++ b/tests/ui/traits/fnonce-repro-trait-impl-13434.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/13434 + //@ run-pass #[derive(Debug)] struct MyStruct; diff --git a/tests/ui/type-inference/type-collect-inference.rs b/tests/ui/type-inference/partial-type-hint-12909.rs index f2c33806aae..d7017f451e3 100644 --- a/tests/ui/type-inference/type-collect-inference.rs +++ b/tests/ui/type-inference/partial-type-hint-12909.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/12909 + //@ run-pass #![allow(unused_variables)] diff --git a/tests/ui/match/function-in-pattern-error.rs b/tests/ui/typeck/function-in-pattern-error-12863.rs index 1ac1c3d818e..d2fa2555658 100644 --- a/tests/ui/match/function-in-pattern-error.rs +++ b/tests/ui/typeck/function-in-pattern-error-12863.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/12863 + mod foo { pub fn bar() {} } fn main() { diff --git a/tests/ui/issues/issue-12863.stderr b/tests/ui/typeck/function-in-pattern-error-12863.stderr index 95d4a704e72..f28874b5d48 100644 --- a/tests/ui/issues/issue-12863.stderr +++ b/tests/ui/typeck/function-in-pattern-error-12863.stderr @@ -1,5 +1,5 @@ error[E0532]: expected unit struct, unit variant or constant, found function `foo::bar` - --> $DIR/issue-12863.rs:5:9 + --> $DIR/function-in-pattern-error-12863.rs:7:9 | LL | foo::bar => {} | ^^^^^^^^ not a unit struct, unit variant or constant diff --git a/tests/ui/type-inference/isize-usize-mismatch-error.rs b/tests/ui/typeck/isize-usize-mismatch-error.rs index 5d31d7f861c..2fb5cf489c0 100644 --- a/tests/ui/type-inference/isize-usize-mismatch-error.rs +++ b/tests/ui/typeck/isize-usize-mismatch-error.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/13359 + //@ dont-require-annotations: NOTE fn foo(_s: i16) { } diff --git a/tests/ui/issues/issue-13359.stderr b/tests/ui/typeck/isize-usize-mismatch-error.stderr index 91f5de8e8f3..d5724665a03 100644 --- a/tests/ui/issues/issue-13359.stderr +++ b/tests/ui/typeck/isize-usize-mismatch-error.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-13359.rs:8:9 + --> $DIR/isize-usize-mismatch-error.rs:10:9 | LL | foo(1*(1 as isize)); | --- ^^^^^^^^^^^^^^ expected `i16`, found `isize` @@ -7,7 +7,7 @@ LL | foo(1*(1 as isize)); | arguments to this function are incorrect | note: function defined here - --> $DIR/issue-13359.rs:3:4 + --> $DIR/isize-usize-mismatch-error.rs:5:4 | LL | fn foo(_s: i16) { } | ^^^ ------- @@ -17,7 +17,7 @@ LL | foo((1*(1 as isize)).try_into().unwrap()); | + +++++++++++++++++++++ error[E0308]: mismatched types - --> $DIR/issue-13359.rs:12:9 + --> $DIR/isize-usize-mismatch-error.rs:14:9 | LL | bar(1*(1 as usize)); | --- ^^^^^^^^^^^^^^ expected `u32`, found `usize` @@ -25,7 +25,7 @@ LL | bar(1*(1 as usize)); | arguments to this function are incorrect | note: function defined here - --> $DIR/issue-13359.rs:5:4 + --> $DIR/isize-usize-mismatch-error.rs:7:4 | LL | fn bar(_s: u32) { } | ^^^ ------- diff --git a/tests/ui/type-inference/unit-type-add-error.rs b/tests/ui/typeck/unit-type-add-error-11771.rs index c69cd1e79e3..d009f50f4b9 100644 --- a/tests/ui/type-inference/unit-type-add-error.rs +++ b/tests/ui/typeck/unit-type-add-error-11771.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/11771 + fn main() { let x = (); 1 + diff --git a/tests/ui/issues/issue-11771.stderr b/tests/ui/typeck/unit-type-add-error-11771.stderr index 5603dc18b63..155cc093524 100644 --- a/tests/ui/issues/issue-11771.stderr +++ b/tests/ui/typeck/unit-type-add-error-11771.stderr @@ -1,5 +1,5 @@ error[E0277]: cannot add `()` to `{integer}` - --> $DIR/issue-11771.rs:3:7 + --> $DIR/unit-type-add-error-11771.rs:5:7 | LL | 1 + | ^ no implementation for `{integer} + ()` @@ -17,7 +17,7 @@ LL | 1 + and 56 others error[E0277]: cannot add `()` to `{integer}` - --> $DIR/issue-11771.rs:8:7 + --> $DIR/unit-type-add-error-11771.rs:10:7 | LL | 1 + | ^ no implementation for `{integer} + ()` diff --git a/tests/ui/panics/unwrap-or-panic-input.rs b/tests/ui/typeck/unwrap-or-panic-input-13202.rs index 99ffba3fba5..29833a727c5 100644 --- a/tests/ui/panics/unwrap-or-panic-input.rs +++ b/tests/ui/typeck/unwrap-or-panic-input-13202.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/13202 + //@ run-fail //@ error-pattern:bad input //@ needs-subprocess |
