Rollup merge of #144983 - Oneirical:uncountable-integer, r=jieyouxu
Rehome 37 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` Part of rust-lang/rust#133895 Methodology: 1. Refer to the previously written `tests/ui/SUMMARY.md` 2. Find an appropriate category for the test, using the original issue thread and the test contents. 3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers) 4. Rename the tests to make their purpose clearer Inspired by the methodology that ``@Kivooeo`` was using. r? ``@jieyouxu``
This commit is contained in:
commit
2d05870897
83 changed files with 134 additions and 118 deletions
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/8498
|
||||
//@ run-pass
|
||||
|
||||
pub fn main() {
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/7784
|
||||
//@ run-pass
|
||||
|
||||
use std::ops::Add;
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/78622
|
||||
#![crate_type = "lib"]
|
||||
|
||||
struct S;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0223]: ambiguous associated type
|
||||
--> $DIR/issue-78622.rs:5:5
|
||||
--> $DIR/ambiguous-associated-type-error-78622.rs:6:5
|
||||
|
|
||||
LL | S::A::<f> {}
|
||||
| ^^^^
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/78957
|
||||
#![deny(unused_attributes)]
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error: `#[inline]` attribute cannot be used on function params
|
||||
--> $DIR/issue-78957.rs:5:16
|
||||
--> $DIR/invalid-attributes-on-const-params-78957.rs:6:16
|
||||
|
|
||||
LL | pub struct Foo<#[inline] const N: usize>;
|
||||
| ^^^^^^^^^
|
||||
|
|
@ -7,7 +7,7 @@ LL | pub struct Foo<#[inline] const N: usize>;
|
|||
= help: `#[inline]` can only be applied to functions
|
||||
|
||||
error: `#[inline]` attribute cannot be used on function params
|
||||
--> $DIR/issue-78957.rs:13:17
|
||||
--> $DIR/invalid-attributes-on-const-params-78957.rs:14:17
|
||||
|
|
||||
LL | pub struct Foo2<#[inline] 'a>(PhantomData<&'a ()>);
|
||||
| ^^^^^^^^^
|
||||
|
|
@ -15,7 +15,7 @@ LL | pub struct Foo2<#[inline] 'a>(PhantomData<&'a ()>);
|
|||
= help: `#[inline]` can only be applied to functions
|
||||
|
||||
error: `#[inline]` attribute cannot be used on function params
|
||||
--> $DIR/issue-78957.rs:21:17
|
||||
--> $DIR/invalid-attributes-on-const-params-78957.rs:22:17
|
||||
|
|
||||
LL | pub struct Foo3<#[inline] T>(PhantomData<T>);
|
||||
| ^^^^^^^^^
|
||||
|
|
@ -23,25 +23,25 @@ LL | pub struct Foo3<#[inline] T>(PhantomData<T>);
|
|||
= help: `#[inline]` can only be applied to functions
|
||||
|
||||
error[E0517]: attribute should be applied to a struct, enum, or union
|
||||
--> $DIR/issue-78957.rs:10:23
|
||||
--> $DIR/invalid-attributes-on-const-params-78957.rs:11:23
|
||||
|
|
||||
LL | pub struct Baz<#[repr(C)] const N: usize>;
|
||||
| ^ -------------- not a struct, enum, or union
|
||||
|
||||
error[E0517]: attribute should be applied to a struct, enum, or union
|
||||
--> $DIR/issue-78957.rs:18:24
|
||||
--> $DIR/invalid-attributes-on-const-params-78957.rs:19:24
|
||||
|
|
||||
LL | pub struct Baz2<#[repr(C)] 'a>(PhantomData<&'a ()>);
|
||||
| ^ -- not a struct, enum, or union
|
||||
|
||||
error[E0517]: attribute should be applied to a struct, enum, or union
|
||||
--> $DIR/issue-78957.rs:26:24
|
||||
--> $DIR/invalid-attributes-on-const-params-78957.rs:27:24
|
||||
|
|
||||
LL | pub struct Baz3<#[repr(C)] T>(PhantomData<T>);
|
||||
| ^ - not a struct, enum, or union
|
||||
|
||||
error: `#[cold]` attribute cannot be used on function params
|
||||
--> $DIR/issue-78957.rs:7:16
|
||||
--> $DIR/invalid-attributes-on-const-params-78957.rs:8:16
|
||||
|
|
||||
LL | pub struct Bar<#[cold] const N: usize>;
|
||||
| ^^^^^^^
|
||||
|
|
@ -49,13 +49,13 @@ LL | pub struct Bar<#[cold] const N: usize>;
|
|||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= help: `#[cold]` can only be applied to functions
|
||||
note: the lint level is defined here
|
||||
--> $DIR/issue-78957.rs:1:9
|
||||
--> $DIR/invalid-attributes-on-const-params-78957.rs:2:9
|
||||
|
|
||||
LL | #![deny(unused_attributes)]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: `#[cold]` attribute cannot be used on function params
|
||||
--> $DIR/issue-78957.rs:15:17
|
||||
--> $DIR/invalid-attributes-on-const-params-78957.rs:16:17
|
||||
|
|
||||
LL | pub struct Bar2<#[cold] 'a>(PhantomData<&'a ()>);
|
||||
| ^^^^^^^
|
||||
|
|
@ -64,7 +64,7 @@ LL | pub struct Bar2<#[cold] 'a>(PhantomData<&'a ()>);
|
|||
= help: `#[cold]` can only be applied to functions
|
||||
|
||||
error: `#[cold]` attribute cannot be used on function params
|
||||
--> $DIR/issue-78957.rs:23:17
|
||||
--> $DIR/invalid-attributes-on-const-params-78957.rs:24:17
|
||||
|
|
||||
LL | pub struct Bar3<#[cold] T>(PhantomData<T>);
|
||||
| ^^^^^^^
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/77218
|
||||
//@ run-rustfix
|
||||
fn main() {
|
||||
let value = [7u8];
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/77218
|
||||
//@ run-rustfix
|
||||
fn main() {
|
||||
let value = [7u8];
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0070]: invalid left-hand side of assignment
|
||||
--> $DIR/issue-77218.rs:4:19
|
||||
--> $DIR/invalid-assignment-in-while-loop-77218.rs:5:19
|
||||
|
|
||||
LL | while Some(0) = value.get(0) {}
|
||||
| - ^
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/78192
|
||||
//@ run-pass
|
||||
|
||||
#![allow(unused_assignments)]
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
// https://github.com/rust-lang/rust/issues/7660
|
||||
//@ run-pass
|
||||
#![allow(unused_variables)]
|
||||
// Regression test for issue 7660
|
||||
// rvalue lifetime too short when equivalent `match` works
|
||||
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
struct A(isize, isize);
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/76042
|
||||
//@ run-pass
|
||||
//@ compile-flags: -Coverflow-checks=off -Ccodegen-units=1 -Copt-level=0
|
||||
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/8248
|
||||
//@ run-pass
|
||||
|
||||
trait A {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
warning: method `dummy` is never used
|
||||
--> $DIR/issue-8248.rs:4:8
|
||||
--> $DIR/mut-trait-coercion-8248.rs:5:8
|
||||
|
|
||||
LL | trait A {
|
||||
| - method in this trait
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/8398
|
||||
//@ check-pass
|
||||
#![allow(dead_code)]
|
||||
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/76191
|
||||
// Regression test for diagnostic issue #76191
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
error[E0080]: evaluation panicked: explicit panic
|
||||
--> $DIR/issue-76191.rs:8:37
|
||||
--> $DIR/const-range-matching-76191.rs:9:37
|
||||
|
|
||||
LL | const RANGE2: RangeInclusive<i32> = panic!();
|
||||
| ^^^^^^^^ evaluation of `RANGE2` failed here
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-76191.rs:14:9
|
||||
--> $DIR/const-range-matching-76191.rs:15:9
|
||||
|
|
||||
LL | const RANGE: RangeInclusive<i32> = 0..=255;
|
||||
| -------------------------------- constant defined here
|
||||
|
|
@ -27,7 +27,7 @@ LL + 0..=255 => {}
|
|||
|
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-76191.rs:16:9
|
||||
--> $DIR/const-range-matching-76191.rs:17:9
|
||||
|
|
||||
LL | const RANGE2: RangeInclusive<i32> = panic!();
|
||||
| --------------------------------- constant defined here
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
// https://github.com/rust-lang/rust/issues/8259
|
||||
//@ run-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
//@ aux-build:issue-8259.rs
|
||||
//@ aux-build:aux-8259.rs
|
||||
|
||||
|
||||
extern crate issue_8259 as other;
|
||||
extern crate aux_8259 as other;
|
||||
static a: other::Foo<'static> = other::Foo::A;
|
||||
|
||||
pub fn main() {}
|
||||
10
tests/ui/cross-crate/tuple-like-structs-cross-crate-7899.rs
Normal file
10
tests/ui/cross-crate/tuple-like-structs-cross-crate-7899.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
// https://github.com/rust-lang/rust/issues/7899
|
||||
//@ run-pass
|
||||
#![allow(unused_variables)]
|
||||
//@ aux-build:aux-7899.rs
|
||||
|
||||
extern crate aux_7899 as testcrate;
|
||||
|
||||
fn main() {
|
||||
let f = testcrate::V2(1.0f32, 2.0f32);
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
//@ run-pass
|
||||
//@ aux-build:aux-8401.rs
|
||||
// https://github.com/rust-lang/rust/issues/8401
|
||||
|
||||
extern crate aux_8401;
|
||||
|
||||
pub fn main() {}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/8761
|
||||
enum Foo {
|
||||
A = 1i64,
|
||||
//~^ ERROR mismatched types
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-8761.rs:2:9
|
||||
--> $DIR/enum-discriminant-type-mismatch-8761.rs:3:9
|
||||
|
|
||||
LL | A = 1i64,
|
||||
| ^^^^ expected `isize`, found `i64`
|
||||
|
|
@ -11,7 +11,7 @@ LL + A = 1isize,
|
|||
|
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-8761.rs:5:9
|
||||
--> $DIR/enum-discriminant-type-mismatch-8761.rs:6:9
|
||||
|
|
||||
LL | B = 2u8
|
||||
| ^^^ expected `isize`, found `u8`
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/80607
|
||||
// This tests makes sure the diagnostics print the offending enum variant, not just the type.
|
||||
pub enum Enum {
|
||||
V1(i32),
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0559]: variant `Enum::V1` has no field named `x`
|
||||
--> $DIR/issue-80607.rs:7:16
|
||||
--> $DIR/enum-variant-field-error-80607.rs:8:16
|
||||
|
|
||||
LL | V1(i32),
|
||||
| -- `Enum::V1` defined here
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/8506
|
||||
//@ run-pass
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/75283
|
||||
extern "C" {
|
||||
fn lol() { //~ ERROR incorrect function inside `extern` block
|
||||
println!("");
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error: incorrect function inside `extern` block
|
||||
--> $DIR/issue-75283.rs:2:8
|
||||
--> $DIR/function-definition-in-extern-block-75283.rs:3:8
|
||||
|
|
||||
LL | extern "C" {
|
||||
| ---------- `extern` blocks define existing foreign functions and functions inside of them cannot have a body
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/86756
|
||||
//@ edition: 2015
|
||||
trait Foo<T, T = T> {}
|
||||
//~^ ERROR the name `T` is already used for a generic parameter in this item's generic parameters
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
|
||||
--> $DIR/issue-86756.rs:2:14
|
||||
--> $DIR/duplicate-generic-parameter-error-86756.rs:3:14
|
||||
|
|
||||
LL | trait Foo<T, T = T> {}
|
||||
| - ^ already used
|
||||
|
|
@ -7,13 +7,13 @@ LL | trait Foo<T, T = T> {}
|
|||
| first use of `T`
|
||||
|
||||
error[E0412]: cannot find type `dyn` in this scope
|
||||
--> $DIR/issue-86756.rs:6:10
|
||||
--> $DIR/duplicate-generic-parameter-error-86756.rs:7:10
|
||||
|
|
||||
LL | eq::<dyn, Foo>
|
||||
| ^^^ not found in this scope
|
||||
|
||||
warning: trait objects without an explicit `dyn` are deprecated
|
||||
--> $DIR/issue-86756.rs:6:15
|
||||
--> $DIR/duplicate-generic-parameter-error-86756.rs:7:15
|
||||
|
|
||||
LL | eq::<dyn, Foo>
|
||||
| ^^^
|
||||
|
|
@ -27,13 +27,13 @@ LL | eq::<dyn, dyn Foo>
|
|||
| +++
|
||||
|
||||
error[E0107]: missing generics for trait `Foo`
|
||||
--> $DIR/issue-86756.rs:6:15
|
||||
--> $DIR/duplicate-generic-parameter-error-86756.rs:7:15
|
||||
|
|
||||
LL | eq::<dyn, Foo>
|
||||
| ^^^ expected at least 1 generic argument
|
||||
|
|
||||
note: trait defined here, with at least 1 generic parameter: `T`
|
||||
--> $DIR/issue-86756.rs:2:7
|
||||
--> $DIR/duplicate-generic-parameter-error-86756.rs:3:7
|
||||
|
|
||||
LL | trait Foo<T, T = T> {}
|
||||
| ^^^ -
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/85461
|
||||
//@ compile-flags: -Cinstrument-coverage -Ccodegen-units=4 --crate-type dylib -Copt-level=0
|
||||
//@ build-pass
|
||||
//@ needs-profiler-runtime
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
//@ run-rustfix
|
||||
fn main() {
|
||||
let value = [7u8];
|
||||
while let Some(0) = value.get(0) { //~ ERROR invalid left-hand side of assignment
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
//@ run-rustfix
|
||||
fn main() {
|
||||
let value = [7u8];
|
||||
while Some(0) = value.get(0) { //~ ERROR invalid left-hand side of assignment
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
error[E0070]: invalid left-hand side of assignment
|
||||
--> $DIR/issue-77218-2.rs:4:19
|
||||
|
|
||||
LL | while Some(0) = value.get(0) {
|
||||
| - ^
|
||||
| |
|
||||
| cannot assign to this expression
|
||||
|
|
||||
help: you might have meant to use pattern destructuring
|
||||
|
|
||||
LL | while let Some(0) = value.get(0) {
|
||||
| +++
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0070`.
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
//@ run-pass
|
||||
#![allow(unused_variables)]
|
||||
//@ aux-build:issue-7899.rs
|
||||
|
||||
|
||||
extern crate issue_7899 as testcrate;
|
||||
|
||||
fn main() {
|
||||
let f = testcrate::V2(1.0f32, 2.0f32);
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
//@ run-pass
|
||||
//@ aux-build:issue-8044.rs
|
||||
|
||||
|
||||
extern crate issue_8044 as minimal;
|
||||
use minimal::{BTree, leaf};
|
||||
|
||||
pub fn main() {
|
||||
BTree::<isize> { node: leaf(1) };
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
//@ run-pass
|
||||
//@ aux-build:issue-8401.rs
|
||||
|
||||
|
||||
extern crate issue_8401;
|
||||
|
||||
pub fn main() {}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
//@ run-pass
|
||||
//@ aux-build:issue-9123.rs
|
||||
|
||||
|
||||
extern crate issue_9123;
|
||||
|
||||
pub fn main() {}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/81584
|
||||
//@ run-rustfix
|
||||
fn main() {
|
||||
let _ = vec![vec![0, 1], vec![2]]
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/81584
|
||||
//@ run-rustfix
|
||||
fn main() {
|
||||
let _ = vec![vec![0, 1], vec![2]]
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0515]: cannot return value referencing function parameter `y`
|
||||
--> $DIR/issue-81584.rs:5:22
|
||||
--> $DIR/iterator-scope-collect-suggestion-81584.rs:6:22
|
||||
|
|
||||
LL | .map(|y| y.iter().map(|x| x + 1))
|
||||
| -^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
// https://github.com/rust-lang/rust/issues/7970
|
||||
macro_rules! one_arg_macro {
|
||||
($fmt:expr) => (print!(concat!($fmt, "\n")));
|
||||
($fmt:expr) => {
|
||||
print!(concat!($fmt, "\n"))
|
||||
};
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error: unexpected end of macro invocation
|
||||
--> $DIR/issue-7970a.rs:6:5
|
||||
--> $DIR/macro-invocation-span-error-7970.rs:9:5
|
||||
|
|
||||
LL | macro_rules! one_arg_macro {
|
||||
| -------------------------- when calling this macro
|
||||
|
|
@ -8,9 +8,9 @@ LL | one_arg_macro!();
|
|||
| ^^^^^^^^^^^^^^^^ missing tokens in macro arguments
|
||||
|
|
||||
note: while trying to match meta-variable `$fmt:expr`
|
||||
--> $DIR/issue-7970a.rs:2:6
|
||||
--> $DIR/macro-invocation-span-error-7970.rs:3:6
|
||||
|
|
||||
LL | ($fmt:expr) => (print!(concat!($fmt, "\n")));
|
||||
LL | ($fmt:expr) => {
|
||||
| ^^^^^^^^^
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/8521
|
||||
//@ check-pass
|
||||
trait Foo1 {}
|
||||
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/7911
|
||||
//@ run-pass
|
||||
// (Closes #7911) Test that we can use the same self expression
|
||||
// with different mutability in macro in two methods
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
warning: method `dummy` is never used
|
||||
--> $DIR/issue-7911.rs:7:8
|
||||
--> $DIR/macro-self-mutability-7911.rs:8:8
|
||||
|
|
||||
LL | trait FooBar {
|
||||
| ------ method in this trait
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/7867
|
||||
//@ dont-require-annotations: NOTE
|
||||
|
||||
enum A { B, C }
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-7867.rs:9:9
|
||||
--> $DIR/mismatched-types-in-match-pattern-7867.rs:10:9
|
||||
|
|
||||
LL | enum A { B, C }
|
||||
| - unit variant defined here
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/7575
|
||||
//@ run-pass
|
||||
|
||||
trait Foo { //~ WARN trait `Foo` is never used
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
warning: trait `Foo` is never used
|
||||
--> $DIR/issue-7575.rs:3:7
|
||||
--> $DIR/trait-method-self-param-error-7575.rs:4:7
|
||||
|
|
||||
LL | trait Foo {
|
||||
| ^^^
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/81918
|
||||
//@ check-pass
|
||||
//@ dont-check-compiler-stdout
|
||||
//@ compile-flags: -Z unpretty=mir-cfg
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/87490
|
||||
fn main() {}
|
||||
trait StreamOnce {
|
||||
type Position;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-87490.rs:9:5
|
||||
--> $DIR/mismatched-types-in-trait-implementation-87490.rs:10:5
|
||||
|
|
||||
LL | fn follow(_: &str) -> <&str as StreamOnce>::Position {
|
||||
| ------------------------------ expected `usize` because of return type
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/8391
|
||||
//@ run-pass
|
||||
|
||||
fn main() {
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/8860
|
||||
//@ run-pass
|
||||
// FIXME(static_mut_refs): this could use an atomic
|
||||
#![allow(static_mut_refs)]
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/76077
|
||||
//@ run-rustfix
|
||||
#![allow(dead_code, unused_variables)]
|
||||
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/76077
|
||||
//@ run-rustfix
|
||||
#![allow(dead_code, unused_variables)]
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error: pattern requires `..` due to inaccessible fields
|
||||
--> $DIR/issue-76077-1.rs:13:9
|
||||
--> $DIR/inaccessible-fields-pattern-matching-76077.rs:14:9
|
||||
|
|
||||
LL | let foo::Foo {} = foo::Foo::default();
|
||||
| ^^^^^^^^^^^
|
||||
|
|
@ -10,7 +10,7 @@ LL | let foo::Foo { .. } = foo::Foo::default();
|
|||
| ++
|
||||
|
||||
error: pattern requires `..` due to inaccessible fields
|
||||
--> $DIR/issue-76077-1.rs:16:9
|
||||
--> $DIR/inaccessible-fields-pattern-matching-76077.rs:17:9
|
||||
|
|
||||
LL | let foo::Bar { visible } = foo::Bar::default();
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/76077
|
||||
pub mod foo {
|
||||
pub struct Foo {
|
||||
you_cant_use_this_field: bool,
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error: cannot construct `Foo` with struct literal syntax due to private fields
|
||||
--> $DIR/issue-76077.rs:8:5
|
||||
--> $DIR/private-field-struct-construction-76077.rs:9:5
|
||||
|
|
||||
LL | foo::Foo {};
|
||||
| ^^^^^^^^
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/8727
|
||||
// Verify the compiler fails with an error on infinite function
|
||||
// recursions.
|
||||
|
||||
|
|
@ -9,7 +10,6 @@ fn generic<T>() { //~ WARN function cannot return without recursing
|
|||
}
|
||||
//~^^ ERROR reached the recursion limit while instantiating `generic::<Option<
|
||||
|
||||
|
||||
fn main () {
|
||||
// Use generic<T> at least once to trigger instantiation.
|
||||
generic::<i32>();
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
warning: function cannot return without recursing
|
||||
--> $DIR/issue-8727.rs:7:1
|
||||
--> $DIR/infinite-function-recursion-error-8727.rs:8:1
|
||||
|
|
||||
LL | fn generic<T>() {
|
||||
| ^^^^^^^^^^^^^^^ cannot return without recursing
|
||||
|
|
@ -10,17 +10,17 @@ LL | generic::<Option<T>>();
|
|||
= note: `#[warn(unconditional_recursion)]` on by default
|
||||
|
||||
error: reached the recursion limit while instantiating `generic::<Option<Option<Option<Option<...>>>>>`
|
||||
--> $DIR/issue-8727.rs:8:5
|
||||
--> $DIR/infinite-function-recursion-error-8727.rs:9:5
|
||||
|
|
||||
LL | generic::<Option<T>>();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: `generic` defined here
|
||||
--> $DIR/issue-8727.rs:7:1
|
||||
--> $DIR/infinite-function-recursion-error-8727.rs:8:1
|
||||
|
|
||||
LL | fn generic<T>() {
|
||||
| ^^^^^^^^^^^^^^^
|
||||
= note: the full name for the type has been written to '$TEST_BUILD_DIR/issue-8727.long-type-$LONG_TYPE_HASH.txt'
|
||||
= note: the full name for the type has been written to '$TEST_BUILD_DIR/infinite-function-recursion-error-8727.long-type-$LONG_TYPE_HASH.txt'
|
||||
= note: consider using `--verbose` to print the full type name to the console
|
||||
|
||||
error: aborting due to 1 previous error; 1 warning emitted
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/7663
|
||||
//@ run-pass
|
||||
|
||||
#![allow(unused_imports, dead_code)]
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/8578
|
||||
//@ check-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(non_camel_case_types)]
|
||||
10
tests/ui/structs-enums/struct-and-enum-usage-8044.rs
Normal file
10
tests/ui/structs-enums/struct-and-enum-usage-8044.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
// https://github.com/rust-lang/rust/issues/8044
|
||||
//@ run-pass
|
||||
//@ aux-build:aux-8044.rs
|
||||
|
||||
extern crate aux_8044 as minimal;
|
||||
use minimal::{BTree, leaf};
|
||||
|
||||
pub fn main() {
|
||||
BTree::<isize> { node: leaf(1) };
|
||||
}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/8783
|
||||
//@ run-pass
|
||||
#![allow(unused_variables)]
|
||||
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/83048
|
||||
//@ compile-flags: -Z unpretty=thir-tree
|
||||
|
||||
pub fn main() {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0268]: `break` outside of a loop or labeled block
|
||||
--> $DIR/issue-83048.rs:4:5
|
||||
--> $DIR/break-outside-loop-error-83048.rs:5:5
|
||||
|
|
||||
LL | break;
|
||||
| ^^^^^ cannot `break` outside of a loop or labeled block
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/87707
|
||||
// test for #87707
|
||||
//@ edition:2018
|
||||
//@ run-fail
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
thread 'main' ($TID) panicked at $DIR/issue-87707.rs:14:24:
|
||||
thread 'main' ($TID) panicked at $DIR/track-caller-for-once-87707.rs:15:24:
|
||||
Here Once instance is poisoned.
|
||||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
|
||||
|
||||
thread 'main' ($TID) panicked at $DIR/issue-87707.rs:16:7:
|
||||
thread 'main' ($TID) panicked at $DIR/track-caller-for-once-87707.rs:17:7:
|
||||
Once instance has previously been poisoned
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/87199
|
||||
// Regression test for issue #87199, where attempting to relax a bound
|
||||
// other than the only supported `?Sized` would still cause the compiler
|
||||
// to assume that the `Sized` bound was relaxed.
|
||||
|
|
@ -1,23 +1,23 @@
|
|||
error: bound modifier `?` can only be applied to `Sized`
|
||||
--> $DIR/issue-87199.rs:8:11
|
||||
--> $DIR/relaxed-bounds-assumed-unsized-87199.rs:9:11
|
||||
|
|
||||
LL | fn arg<T: ?Send>(_: T) {}
|
||||
| ^^^^^
|
||||
|
||||
error: bound modifier `?` can only be applied to `Sized`
|
||||
--> $DIR/issue-87199.rs:10:15
|
||||
--> $DIR/relaxed-bounds-assumed-unsized-87199.rs:11:15
|
||||
|
|
||||
LL | fn ref_arg<T: ?Send>(_: &T) {}
|
||||
| ^^^^^
|
||||
|
||||
error: bound modifier `?` can only be applied to `Sized`
|
||||
--> $DIR/issue-87199.rs:12:40
|
||||
--> $DIR/relaxed-bounds-assumed-unsized-87199.rs:13:40
|
||||
|
|
||||
LL | fn ret() -> impl Iterator<Item = ()> + ?Send { std::iter::empty() }
|
||||
| ^^^^^
|
||||
|
||||
error: bound modifier `?` can only be applied to `Sized`
|
||||
--> $DIR/issue-87199.rs:12:40
|
||||
--> $DIR/relaxed-bounds-assumed-unsized-87199.rs:13:40
|
||||
|
|
||||
LL | fn ret() -> impl Iterator<Item = ()> + ?Send { std::iter::empty() }
|
||||
| ^^^^^
|
||||
|
|
@ -25,14 +25,14 @@ LL | fn ret() -> impl Iterator<Item = ()> + ?Send { std::iter::empty() }
|
|||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
|
||||
error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
|
||||
--> $DIR/issue-87199.rs:19:15
|
||||
--> $DIR/relaxed-bounds-assumed-unsized-87199.rs:20:15
|
||||
|
|
||||
LL | ref_arg::<[i32]>(&[5]);
|
||||
| ^^^^^ doesn't have a size known at compile-time
|
||||
|
|
||||
= help: the trait `Sized` is not implemented for `[i32]`
|
||||
note: required by an implicit `Sized` bound in `ref_arg`
|
||||
--> $DIR/issue-87199.rs:10:12
|
||||
--> $DIR/relaxed-bounds-assumed-unsized-87199.rs:11:12
|
||||
|
|
||||
LL | fn ref_arg<T: ?Send>(_: &T) {}
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `ref_arg`
|
||||
7
tests/ui/traits/default-method-fn-call-9123.rs
Normal file
7
tests/ui/traits/default-method-fn-call-9123.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
// https://github.com/rust-lang/rust/issues/9123
|
||||
//@ run-pass
|
||||
//@ aux-build:aux-9123.rs
|
||||
|
||||
extern crate aux_9123;
|
||||
|
||||
pub fn main() {}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/8249
|
||||
//@ run-pass
|
||||
#![allow(dead_code)]
|
||||
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/7673
|
||||
//@ check-pass
|
||||
#![allow(dead_code)]
|
||||
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/8171
|
||||
//@ check-pass
|
||||
#![allow(dead_code)]
|
||||
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/7563
|
||||
//@ run-pass
|
||||
#![allow(dead_code)]
|
||||
trait IDummy {
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
// https://github.com/rust-lang/rust/issues/8767
|
||||
impl B { //~ ERROR cannot find type `B` in this scope
|
||||
}
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0412]: cannot find type `B` in this scope
|
||||
--> $DIR/issue-8767.rs:1:6
|
||||
--> $DIR/impl-for-nonexistent-type-error-8767.rs:2:6
|
||||
|
|
||||
LL | impl B {
|
||||
| ^ not found in this scope
|
||||
Loading…
Add table
Add a link
Reference in a new issue