1
Fork 0

tests: remove //@ pretty-expanded usages

Done with

```bash
sd '//@ pretty-expanded.*\n' '' tests/ui/**/*.rs
```

and

```
sd '//@pretty-expanded.*\n' '' tests/ui/**/*.rs
```
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2024-11-26 01:56:46 +08:00
parent f62753f84f
commit 95ff642797
656 changed files with 23 additions and 662 deletions

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
#[link(name = "rust_test_helpers", kind = "static")]
extern "C" {

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
mod rustrt {
#[link(name = "rust_test_helpers", kind = "static")]

View file

@ -1,6 +1,5 @@
//@ run-pass
//@ aux-build:anon-extern-mod-cross-crate-1.rs
//@ pretty-expanded FIXME #23616
extern crate anonexternmod;

View file

@ -1,7 +1,6 @@
//@ run-pass
//@ aux-build:anon-extern-mod-cross-crate-1.rs
//@ aux-build:anon-extern-mod-cross-crate-1.rs
//@ pretty-expanded FIXME #23616
extern crate anonexternmod;

View file

@ -3,7 +3,6 @@
// Test a foreign function that accepts empty struct.
//@ pretty-expanded FIXME #23616
//@ ignore-msvc
//@ ignore-emscripten emcc asserts on an empty struct as an argument

View file

@ -5,7 +5,6 @@
// successfully (and safely) invoke external, cdecl
// functions from outside the crate.
//@ pretty-expanded FIXME #23616
extern crate foreign_lib;

View file

@ -7,7 +7,6 @@
// Regression test for issue #374
//@ pretty-expanded FIXME #23616
enum sty { ty_nil, }

View file

@ -2,7 +2,6 @@
// issues #10618 and #16382
//@ pretty-expanded FIXME #23616
const SIZE: isize = 25;

View file

@ -1,6 +1,5 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
#![allow(unused_mut)]

View file

@ -1,7 +1,6 @@
//@ run-pass
#![allow(unused_mut)]
#![allow(unused_variables)]
//@ pretty-expanded FIXME #23616
fn main() {
let mut array = [1, 2, 3];

View file

@ -2,7 +2,6 @@
// Check that codegen doesn't ICE when codegenning an array repeat
// expression with a count of 1 and a non-Copy element type.
//@ pretty-expanded FIXME #23616
fn main() {
let _ = [Box::new(1_usize); 1];

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
pub fn main() {
let _x: &mut [isize] = &mut [ 1, 2, 3 ];

View file

@ -1,7 +1,6 @@
//@ run-pass
#![allow(unused_variables)]
//@ pretty-expanded FIXME #23616
macro_rules! vec [
($($e:expr),*) => ({

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
pub fn main() { let _a = [0; 1 as usize]; }

View file

@ -1,6 +1,5 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
pub fn main() {
let _quux: Box<Vec<usize>> = Box::new(Vec::new());

View file

@ -1,7 +1,6 @@
//@ run-pass
// Test equality constraints on associated types in a where clause.
//@ pretty-expanded FIXME #23616
pub trait Foo {
type A;

View file

@ -5,7 +5,6 @@
// `Target=[A]`, then the impl marked with `(*)` is seen to conflict
// with all the others.
//@ pretty-expanded FIXME #23616
use std::marker::PhantomData;
use std::ops::Deref;

View file

@ -4,7 +4,6 @@
// (modulo bound lifetime names) appears in the environment
// twice. Issue #21965.
//@ pretty-expanded FIXME #23616
fn foo<T>(t: T) -> i32
where T : for<'a> Fn(&'a u8) -> i32,

View file

@ -3,7 +3,6 @@
// Check that we do not report ambiguities when the same predicate
// appears in the environment twice. Issue #21965.
//@ pretty-expanded FIXME #23616
trait Foo {
type B;

View file

@ -1,7 +1,6 @@
//@ run-pass
// Test equality constraints on associated types inside of an object type
//@ pretty-expanded FIXME #23616
pub trait Foo {
type A;

View file

@ -2,7 +2,6 @@
// Test that we are able to have an impl that defines an associated type
// before the actual trait.
//@ pretty-expanded FIXME #23616
impl X for f64 { type Y = isize; }
trait X { type Y; }

View file

@ -2,7 +2,6 @@
#![allow(unused_variables)]
// Test that we can resolve nested projection types. Issue #20666.
//@ pretty-expanded FIXME #23616
use std::slice;

View file

@ -1,5 +1,5 @@
warning: method `into_iter` is never used
--> $DIR/associated-types-nested-projections.rs:16:8
--> $DIR/associated-types-nested-projections.rs:15:8
|
LL | trait IntoIterator {
| ------------ method in this trait

View file

@ -3,7 +3,6 @@
// Test that we normalize associated types that appear in a bound that
// contains a binding. Issue #21664.
//@ pretty-expanded FIXME #23616
#![allow(dead_code)]

View file

@ -3,7 +3,6 @@
// Test that we normalize associated types that appear in bounds; if
// we didn't, the call to `self.split2()` fails to type check.
//@ pretty-expanded FIXME #23616
use std::marker::PhantomData;

View file

@ -3,7 +3,6 @@
// Test that we normalize associated types that appear in bounds; if
// we didn't, the call to `self.split2()` fails to type check.
//@ pretty-expanded FIXME #23616
use std::marker::PhantomData;

View file

@ -6,7 +6,6 @@
// appear in associated type bindings in object types, which were not
// being properly flagged.
//@ pretty-expanded FIXME #23616
use std::ops::{Shl, Shr};
use std::cell::RefCell;

View file

@ -3,7 +3,6 @@
#![allow(unused_variables)]
// Test a where clause that uses a non-normalized projection type.
//@ pretty-expanded FIXME #23616
trait Int
{

View file

@ -1,5 +1,4 @@
//@ check-pass
//@ pretty-expanded FIXME #23616
trait Foo<T> {
type Bar;

View file

@ -1,7 +1,6 @@
//@ run-pass
// Test associated type references in structure fields.
//@ pretty-expanded FIXME #23616
trait Test {
type V;

View file

@ -3,7 +3,6 @@
// Regression test for #20582. This test caused an ICE related to
// inconsistent region erasure in codegen.
//@ pretty-expanded FIXME #23616
struct Foo<'a> {
buf: &'a[u8]

View file

@ -1,5 +1,4 @@
//@ check-pass
//@ pretty-expanded FIXME #23616
trait Get<T> {
fn get(&self) -> T;

View file

@ -1,5 +1,4 @@
//@ check-pass
//@ pretty-expanded FIXME #23616
trait Trait<Input> {
type Output;

View file

@ -1,6 +1,5 @@
//@ check-pass
#![allow(unused_variables)]
//@ pretty-expanded FIXME #23616
trait Trait<Input> {
type Output;

View file

@ -1,6 +1,5 @@
//@ check-pass
#![allow(dead_code)]
//@ pretty-expanded FIXME #23616
trait T0 {
type O;

View file

@ -1,6 +1,5 @@
//@ check-pass
#![allow(dead_code)]
//@ pretty-expanded FIXME #23616
trait T0 {
type O;

View file

@ -1,5 +1,4 @@
//@ check-pass
//@ pretty-expanded FIXME #23616
#![no_implicit_prelude]

View file

@ -4,7 +4,6 @@
// subtyping of projection types that resulted in an unconstrained
// region, yielding region inference failures.
//@ pretty-expanded FIXME #23616
fn main() { }

View file

@ -3,7 +3,6 @@
// Test transitive analysis for associated types. Collected types
// should be normalized and new obligations generated.
//@ pretty-expanded FIXME #23616
trait Foo {
type A;

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
#![feature(start)]

View file

@ -1,5 +1,4 @@
//@ build-pass (FIXME(62277): could be check-pass?)
//@ pretty-expanded FIXME #23616
#![feature(rustc_attrs)]
#![feature(test)]

View file

@ -1,5 +1,4 @@
//@ build-pass (FIXME(62277): could be check-pass?)
//@ pretty-expanded FIXME #23616
#![feature(rustc_attrs)]
#![feature(test)]

View file

@ -1,5 +1,4 @@
//@ build-pass (FIXME(62277): could be check-pass?)
//@ pretty-expanded FIXME #23616
#![feature(rustc_attrs)]

View file

@ -1,6 +1,5 @@
//@ build-pass (FIXME(62277): could be check-pass?)
//@ pp-exact - Make sure we print all the attributes
//@ pretty-expanded FIXME #23616
#![feature(rustc_attrs)]

View file

@ -1,6 +1,5 @@
//@ build-pass (FIXME(62277): could be check-pass?)
//@ pp-exact - Make sure we actually print the attributes
//@ pretty-expanded FIXME #23616
#![allow(non_camel_case_types)]
#![feature(rustc_attrs)]

View file

@ -1,6 +1,5 @@
//@ run-pass
#![allow(dead_code)]
//@ pretty-expanded FIXME #23616
struct Foo {
x: isize,

View file

@ -1,6 +1,5 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
fn main() {
let _ = test(Some(0).into_iter());

View file

@ -1,6 +1,5 @@
//@ run-pass
#![allow(dead_code)]
//@ pretty-expanded FIXME #23616
fn foo(_: &[&str]) {}

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
struct X { x: isize }

View file

@ -1,6 +1,5 @@
//@ run-pass
#![allow(dead_code)]
//@ pretty-expanded FIXME #23616
struct X { x: isize }

View file

@ -3,7 +3,6 @@
#![allow(non_camel_case_types)]
//@ pretty-expanded FIXME #23616
mod m1 {
pub enum foo { foo1, foo2, }

View file

@ -2,7 +2,6 @@
#![allow(dead_code)]
//@ pretty-expanded FIXME #23616
fn altsimple(f: isize) { match f { _x => () } }

View file

@ -1,7 +1,6 @@
//@ run-pass
#![allow(dead_code)]
#![allow(unused_assignments)]
//@ pretty-expanded FIXME #23616
#![allow(non_camel_case_types)]
#![allow(unused_variables)]

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
#![allow(non_upper_case_globals)]
const s: isize = 1;

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
fn foo(x: Option<Box<isize>>, b: bool) -> isize {
match x {

View file

@ -1,4 +1,3 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
pub fn main() { let x = (); match x { () => { } } }

View file

@ -1,7 +1,6 @@
//@ run-pass
#![allow(non_camel_case_types)]
//@ pretty-expanded FIXME #23616
enum clam<T> { a(#[allow(dead_code)] T), }

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
pub fn main() {
struct A {

View file

@ -7,7 +7,6 @@
//
// Example from compiler/rustc_borrowck/borrowck/README.md
//@ pretty-expanded FIXME #23616
fn foo<'a>(mut t0: &'a mut isize,
mut t1: &'a mut isize) {

View file

@ -2,7 +2,6 @@
#![allow(unused_mut)]
#![allow(unused_variables)]
#![allow(dropping_copy_types)]
//@ pretty-expanded FIXME #23616
struct A { a: isize, b: Box<isize> }
struct B { a: Box<isize>, b: Box<isize> }

View file

@ -1,7 +1,6 @@
//@ run-pass
#![allow(dead_code)]
//@ pretty-expanded FIXME #23616
fn borrow(_v: &isize) {}

View file

@ -2,7 +2,6 @@
#![allow(dead_code)]
// Regression test for issue #7740
//@ pretty-expanded FIXME #23616
pub fn main() {
static A: &'static char = &'A';

View file

@ -3,7 +3,6 @@
// This test verifies that casting from the same lifetime on a value
// to the same lifetime on a trait succeeds. See issue #10766.
//@ pretty-expanded FIXME #23616
#![allow(dead_code)]

View file

@ -1,7 +1,6 @@
//@ run-pass
#![allow(dead_code)]
//@ pretty-expanded FIXME #23616
struct Rec {
f: Box<isize>,

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
#![allow(dropping_copy_types)]

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
fn main() {
let _a = Box::new(1);

View file

@ -2,7 +2,6 @@
#![allow(dead_code)]
#![allow(non_camel_case_types)]
//@ pretty-expanded FIXME #23616
pub fn main() {
enum t { t1(isize), t2(isize), }

View file

@ -1,6 +1,5 @@
//@ run-pass
#![allow(dead_code)]
//@ pretty-expanded FIXME #23616
pub fn main() {
let _: Box<_> = Box::new(100);

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
pub fn main() {
let _x: Box<_> = Box::new(vec![0,0,0,0,0]);

View file

@ -3,7 +3,6 @@
// Issue #976
//@ pretty-expanded FIXME #23616
fn f<T>(x: Box<T>) {
let _x2 = x;

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
pub fn main() {
let _i: Box<_> = Box::new(100);

View file

@ -2,7 +2,6 @@
#![allow(dead_code)]
// Issue #961
//@ pretty-expanded FIXME #23616
fn altsimple() {
match Box::new(true) {

View file

@ -2,7 +2,6 @@
#![allow(dead_code)]
// Issue #5192
//@ pretty-expanded FIXME #23616
pub trait EventLoop { fn foo(&self) {} }

View file

@ -5,7 +5,6 @@
// super-builtin-kind of a trait, if the type parameter is never used,
// the type can implement the trait anyway.
//@ pretty-expanded FIXME #23616
use std::marker;

View file

@ -1,7 +1,6 @@
//@ check-pass
// Simple test case of implementing a trait with super-builtin-kinds.
//@ pretty-expanded FIXME #23616
trait Foo : Send { }

View file

@ -2,7 +2,6 @@
// Tests correct implementation of traits with super-builtin-kinds
// using a bounded type parameter.
//@ pretty-expanded FIXME #23616
trait Foo : Send { }

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
fn foo(x: &mut Box<u8>) {
*x = Box::new(5);

View file

@ -2,7 +2,6 @@
// main is conditionally compiled, but the conditional compilation
// is conditional too!
//@ pretty-expanded FIXME #23616
#[cfg_attr(FALSE, cfg(bar))]
fn main() { }

View file

@ -1,7 +1,6 @@
//@ run-pass
// https://github.com/rust-lang/rust/issues/21833#issuecomment-72353044
//@ pretty-expanded FIXME #23616
#![cfg_attr(FALSE, no_core)]

View file

@ -1,5 +1,4 @@
//@ build-pass
//@ pretty-expanded FIXME #23616
//@ ignore-wasm32 no bare family
//@ ignore-sgx

View file

@ -1,6 +1,5 @@
//@ run-pass
#![allow(dead_code)]
//@ pretty-expanded FIXME #23616
enum Foo {
Bar,

View file

@ -1,7 +1,6 @@
//@ build-pass
//@ ignore-sgx
//@ pretty-expanded FIXME #23616
#[cfg(target_family = "windows")]
pub fn main() {}

View file

@ -1,7 +1,6 @@
//@ run-pass
//@ aux-build:cfg_inner_static.rs
//@ pretty-expanded FIXME #23616
extern crate cfg_inner_static;

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
#[cfg(target_arch = "x86")]
pub fn main() { }

View file

@ -1,7 +1,6 @@
//@ run-pass
// Test that cleanups for the RHS of shortcircuiting operators work.
//@ pretty-expanded FIXME #23616
#![allow(deref_nullptr)]

View file

@ -2,7 +2,6 @@
// Regression test for issue #10682
// Nested `proc` usage can't use outer owned data
//@ pretty-expanded FIXME #23616
fn work(_: Box<isize>) {}
fn foo<F:FnOnce()>(_: F) {}

View file

@ -1,6 +1,5 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
pub fn main() {
{|i: u32| if 1 == i { }}; //~ WARN unused closure that must be used

View file

@ -1,5 +1,5 @@
warning: unused closure that must be used
--> $DIR/issue-1460.rs:6:6
--> $DIR/issue-1460.rs:5:6
|
LL | {|i: u32| if 1 == i { }};
| ^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,7 +1,6 @@
//@ run-pass
#![allow(unused_parens)]
#![allow(unit_bindings)]
//@ pretty-expanded FIXME #23616
fn f<T, F>(g: F) -> T where F: FnOnce() -> T { g() }

View file

@ -6,7 +6,6 @@
// Doing it incorrectly causes massive slowdown in LLVM during
// optimisation.
//@ pretty-expanded FIXME #23616
//@ needs-threads
#![feature(intrinsics)]

View file

@ -1,7 +1,6 @@
//@ run-pass
#![allow(unused_braces)]
#![allow(dead_code)]
//@ pretty-expanded FIXME #23616
use std::rc::Rc;

View file

@ -1,6 +1,5 @@
//@ run-pass
#![allow(dead_code)]
//@ pretty-expanded FIXME #23616
fn negate(x: &isize) -> isize {
-*x

View file

@ -1,6 +1,5 @@
//@ run-pass
#![allow(dead_code)]
//@ pretty-expanded FIXME #23616
fn sum(x: &[isize]) -> isize {
let mut sum = 0;

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
struct SpeechMaker {
speeches: usize

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ pretty-expanded FIXME #23616
struct SpeechMaker {
speeches: usize

View file

@ -2,7 +2,6 @@
// Check that coercions unify the expected return type of a polymorphic
// function call, instead of leaving the type variables as they were.
//@ pretty-expanded FIXME #23616
struct Foo;
impl Foo {

View file

@ -1,6 +1,5 @@
//@ run-pass
#![allow(dead_code)]
//@ pretty-expanded FIXME #23616
use std::rc::Rc;

View file

@ -2,7 +2,6 @@
// All 3 expressions should work in that the argument gets
// coerced to a trait object
//@ pretty-expanded FIXME #23616
fn main() {
send::<Box<dyn Foo>>(Box::new(Output(0)));

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