Auto merge of #112071 - WaffleLapkin:group-rfcs-tests, r=oli-obk

Group rfcs tests

This moves all RFC tests to `tests/ui/rfcs/rfc-NNNN-title-title-title/...`

I had to rename some tests due to conflicts, but otherwise this is just a move.
This commit is contained in:
bors 2023-06-05 19:36:17 +00:00
commit e6d4725c76
544 changed files with 146 additions and 146 deletions

View File

@ -11,7 +11,7 @@ use std::path::{Path, PathBuf};
const ENTRY_LIMIT: usize = 900;
// FIXME: The following limits should be reduced eventually.
const ISSUES_ENTRY_LIMIT: usize = 1898;
const ROOT_ENTRY_LIMIT: usize = 891;
const ROOT_ENTRY_LIMIT: usize = 871;
const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
"rs", // test source files

View File

@ -1,22 +0,0 @@
enum Wrapper {
Wrap(i32),
}
use Wrapper::Wrap;
pub fn main() {
let Wrap(x) = &Wrap(3);
*x += 1; //~ ERROR cannot assign to `*x`, which is behind a `&` reference
if let Some(x) = &Some(3) {
*x += 1; //~ ERROR cannot assign to `*x`, which is behind a `&` reference
} else {
panic!();
}
while let Some(x) = &Some(3) {
*x += 1; //~ ERROR cannot assign to `*x`, which is behind a `&` reference
break;
}
}

View File

@ -1,9 +0,0 @@
struct Foo {}
pub fn main() {
let mut tups = vec![(Foo {}, Foo {})];
// The below desugars to &(ref n, mut m).
for (n, mut m) in &tups {
//~^ ERROR cannot move out of a shared reference
}
}

View File

@ -1,24 +0,0 @@
// FIXME(tschottdorf): we want these to compile, but they don't.
fn with_str() {
let s: &'static str = "abc";
match &s {
"abc" => true, //~ ERROR mismatched types
_ => panic!(),
};
}
fn with_bytes() {
let s: &'static [u8] = b"abc";
match &s {
b"abc" => true, //~ ERROR mismatched types
_ => panic!(),
};
}
pub fn main() {
with_str();
with_bytes();
}

View File

@ -1,7 +0,0 @@
pub fn main() {
let sl: &[u8] = b"foo";
match sl { //~ ERROR non-exhaustive patterns
[first, remainder @ ..] => {},
};
}

View File

@ -0,0 +1,45 @@
// run-pass
enum Wrapper {
Wrap(i32),
}
use Wrapper::Wrap;
pub fn main() {
let Wrap(x) = &Wrap(3);
println!("{}", *x);
let Wrap(x) = &mut Wrap(3);
println!("{}", *x);
if let Some(x) = &Some(3) {
println!("{}", *x);
} else {
panic!();
}
if let Some(x) = &mut Some(3) {
println!("{}", *x);
} else {
panic!();
}
if let Some(x) = &mut Some(3) {
*x += 1;
} else {
panic!();
}
while let Some(x) = &Some(3) {
println!("{}", *x);
break;
}
while let Some(x) = &mut Some(3) {
println!("{}", *x);
break;
}
while let Some(x) = &mut Some(3) {
*x += 1;
break;
}
}

View File

@ -1,4 +1,3 @@
// run-pass
enum Wrapper {
Wrap(i32),
}
@ -7,39 +6,17 @@ use Wrapper::Wrap;
pub fn main() {
let Wrap(x) = &Wrap(3);
println!("{}", *x);
*x += 1; //~ ERROR cannot assign to `*x`, which is behind a `&` reference
let Wrap(x) = &mut Wrap(3);
println!("{}", *x);
if let Some(x) = &Some(3) {
println!("{}", *x);
} else {
panic!();
}
if let Some(x) = &mut Some(3) {
println!("{}", *x);
} else {
panic!();
}
if let Some(x) = &mut Some(3) {
*x += 1;
*x += 1; //~ ERROR cannot assign to `*x`, which is behind a `&` reference
} else {
panic!();
}
while let Some(x) = &Some(3) {
println!("{}", *x);
break;
}
while let Some(x) = &mut Some(3) {
println!("{}", *x);
break;
}
while let Some(x) = &mut Some(3) {
*x += 1;
*x += 1; //~ ERROR cannot assign to `*x`, which is behind a `&` reference
break;
}
}

Some files were not shown because too many files have changed in this diff Show More