Remove async_await gates from tests.

This commit is contained in:
Mazdak Farrokhzad 2019-08-02 03:45:58 +02:00
parent 6a14411b76
commit 228015acd2
118 changed files with 19 additions and 224 deletions

View File

@ -1,7 +1,5 @@
// edition:2018
#![feature(async_await)]
// @has async_fn/fn.foo.html '//pre[@class="rust fn"]' 'pub async fn foo() -> Option<Foo>'
pub async fn foo() -> Option<Foo> {
None

View File

@ -1,13 +1,11 @@
// compile-flags:--test
// edition:2018
// prior to setting the default edition for the doctest pre-parser, this doctest would fail due to
// a fatal parsing error
// Prior to setting the default edition for the doctest pre-parser,
// this doctest would fail due to a fatal parsing error.
// see https://github.com/rust-lang/rust/issues/59313
//! ```
//! #![feature(async_await)]
//!
//! fn foo() {
//! drop(async move {});
//! }

View File

@ -1,10 +1,7 @@
// compile-flags:--test -Z unstable-options
// edition:2018
#![feature(async_await)]
/// ```rust
/// #![feature(async_await)]
/// fn main() {
/// let _ = async { };
/// }

View File

@ -3,7 +3,6 @@
#![allow(unused_variables)]
#![deny(unused_mut)]
#![feature(async_await)]
type A = Vec<u32>;

View File

@ -3,8 +3,6 @@
// edition:2018
// aux-build:arc_wake.rs
#![feature(async_await)]
extern crate arc_wake;
use std::pin::Pin;

View File

@ -6,8 +6,6 @@
// edition:2018
// ignore-tidy-linelength
#![feature(async_await)]
fn main() {}
use core::future::Future;

View File

@ -1,7 +1,7 @@
// build-pass
// edition:2018
#![feature(async_await, async_closure)]
#![feature(async_closure)]
macro_rules! match_expr {
($x:expr) => {}

View File

@ -3,7 +3,7 @@
// edition:2018
// aux-build:arc_wake.rs
#![feature(async_await, async_closure)]
#![feature(async_closure)]
extern crate arc_wake;

View File

@ -1,7 +1,6 @@
// edition:2018
#![feature(async_await)]
// Regression test for issue #62382
// Regression test for issue #62382.
use std::future::Future;

View File

@ -6,8 +6,6 @@
// check-pass
// edition:2018
#![feature(async_await)]
struct Foo<'a>(&'a u8);
impl Foo<'_> {

View File

@ -2,8 +2,6 @@
// edition:2018
// compile-flags: --crate-type lib
#![feature(async_await)]
use std::{
cell::RefCell,
fmt::Debug,

View File

@ -1,8 +1,5 @@
// edition:2018
#![feature(async_await)]
#![allow(dead_code)]
struct HasLifetime<'a>(&'a bool);
async fn error(lt: HasLifetime) { //~ ERROR implicit elided lifetime not allowed here

View File

@ -2,8 +2,6 @@
// edition:2018
// compile-flags: --crate-type lib
#![feature(async_await)]
use std::{
cell::RefCell,
fmt::Debug,

View File

@ -12,8 +12,6 @@
// edition:2018
#![feature(async_await)]
use std::future::Future;
use std::pin::Pin;
use std::task::{Context, Poll};

View File

@ -2,8 +2,6 @@
// aux-build:arc_wake.rs
// edition:2018
#![feature(async_await)]
extern crate arc_wake;
use std::pin::Pin;

View File

@ -1,8 +1,6 @@
// build-pass (FIXME(62277): could be check-pass?)
// edition:2018
#![feature(async_await)]
macro_rules! match_expr {
($x:expr) => {}
}

View File

@ -1,7 +1,5 @@
// edition:2018
#![feature(async_await)]
struct S;
impl S {

View File

@ -1,8 +1,6 @@
// build-pass (FIXME(62277): could be check-pass?)
// edition:2018
#![feature(async_await)]
trait MyClosure {
type Args;
}

View File

@ -1,4 +1,3 @@
#![feature(async_await)]
#![allow(non_camel_case_types)]
#![deny(keyword_idents)]

View File

@ -1,7 +1,6 @@
// edition:2018
#![allow(non_camel_case_types)]
#![feature(async_await)]
mod outer_mod {
pub mod await { //~ ERROR expected identifier, found reserved keyword `await`

View File

@ -1,7 +1,5 @@
// edition:2018
#![feature(async_await)]
async fn bar() -> Result<(), ()> {
Ok(())
}

View File

@ -3,8 +3,6 @@
// check-pass
// edition:2018
#![feature(async_await)]
async fn make_boxed_object() -> Box<dyn Send> {
Box::new(()) as _
}

View File

@ -1,8 +1,6 @@
// check-pass
// edition:2018
#![feature(async_await)]
// See issue 60414
trait Trait {

View File

@ -2,8 +2,6 @@
// edition:2018
// compile-flags: --crate-type lib
#![feature(async_await)]
async fn conditional_and_guaranteed_initialization(x: usize) -> usize {
let y;
if x > 5 {

View File

@ -1,7 +1,6 @@
// Test that we don't show variables with from async fn desugaring
// edition:2018
#![feature(async_await)]
async fn async_fn(&ref mut s: &[i32]) {}
//~^ ERROR cannot borrow data in a `&` reference as mutable [E0596]

View File

@ -2,8 +2,6 @@
// This test ensures we don't make the suggestion in bodies that aren't `async`.
#![feature(async_await)]
fn take_u32(x: u32) {}
async fn make_u32() -> u32 {

View File

@ -3,7 +3,6 @@
// run-pass
#![allow(unused_variables)]
#![feature(async_await)]
// Test that the drop order for parameters in a fn and async fn matches up. Also test that
// parameters (used or unused) are not dropped until the async fn completes execution.

View File

@ -3,7 +3,6 @@
// run-pass
#![allow(unused_variables)]
#![feature(async_await)]
// Test that the drop order for parameters in a fn and async fn matches up. Also test that
// parameters (used or unused) are not dropped until the async fn completes execution.

View File

@ -2,9 +2,7 @@
// edition:2018
// run-pass
#![allow(unused_variables)]
#![deny(dead_code)]
#![feature(async_await)]
// Test that the drop order for locals in a fn and async fn matches up.
extern crate arc_wake;

View File

@ -1,8 +1,5 @@
// edition:2018
#![allow(unused_variables)]
#![feature(async_await)]
async fn foobar_async(x: u32, (a, _, _c): (u32, u32, u32), _: u32, _y: u32) {
assert_eq!(__arg1, (1, 2, 3)); //~ ERROR cannot find value `__arg1` in this scope [E0425]
assert_eq!(__arg2, 4); //~ ERROR cannot find value `__arg2` in this scope [E0425]

View File

@ -2,9 +2,6 @@
// edition:2018
// run-pass
#![allow(unused_variables)]
#![feature(async_await)]
// Test that the drop order for parameters in a fn and async fn matches up. Also test that
// parameters (used or unused) are not dropped until the async fn is cancelled.
// This file is mostly copy-pasted from drop-order-for-async-fn-parameters.rs

View File

@ -1,7 +1,5 @@
// edition:2015
#![feature(async_await)]
async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition
fn baz() { async fn foo() {} } //~ ERROR `async fn` is not permitted in the 2015 edition

View File

@ -2,8 +2,6 @@
// edition:2018
// compile-flags: --crate-type lib
#![feature(async_await)]
use std::future::Future;
pub async fn simple_generic<T>() {}

View File

@ -4,9 +4,6 @@
// run-pass
#![feature(async_await)]
#![allow(unused)]
use std::future::Future;
use std::task::Poll;
use std::task::Context;

View File

@ -1,5 +1,4 @@
// edition:2018
#![feature(async_await)]
pub async fn f(x: Option<usize>) {
x.take();

View File

@ -6,9 +6,6 @@
// build-pass (FIXME(62277): could be check-pass?)
// edition:2018
#![feature(async_await)]
#![allow(unused)]
async fn foo<F>(_: &(), _: F) {}
fn main() {

View File

@ -1,6 +1,5 @@
// ignore-tidy-linelength
// edition:2018
#![feature(async_await)]
// This test checks that `Self` is prohibited as a return type. See #61949 for context.

View File

@ -4,8 +4,6 @@
// build-pass
// edition:2018
#![feature(async_await)]
async fn noop() {}
async fn foo() {

View File

@ -2,8 +2,6 @@
//
// Tests that the .await syntax can't be used to make a generator
#![feature(async_await)]
async fn foo() {}
fn make_generator() {

View File

@ -1,7 +1,5 @@
// edition:2018
#![feature(async_await)]
async fn inc(limit: i64) -> i64 {
limit + 1
}

View File

@ -1,7 +1,7 @@
// build-pass (FIXME(62277): could be check-pass?)
// edition:2018
#![feature(arbitrary_self_types, async_await)]
#![feature(arbitrary_self_types)]
use std::task::{self, Poll};
use std::future::Future;

View File

@ -3,7 +3,4 @@
// edition:2018
// pp-exact
#![feature(async_await)]
#![allow(unused_parens)]
fn main() { let _a = (async { }); }

View File

@ -1,8 +1,6 @@
// build-pass (FIXME(62277): could be check-pass?)
// edition:2018
#![feature(async_await)]
use std::sync::Arc;
trait SomeTrait: Send + Sync + 'static {

View File

@ -1,11 +1,8 @@
// build-pass (FIXME(62277): could be check-pass?)
// edition:2018
#![feature(async_await)]
use std::future::Future;
#[allow(unused)]
async fn foo<F: Future<Output = i32>>(x: &i32, future: F) -> i32 {
let y = future.await;
*x + y

View File

@ -1,8 +1,6 @@
// edition:2018
// run-pass
#![feature(async_await)]
trait Foo { }
impl Foo for () { }

View File

@ -1,8 +1,6 @@
// build-pass (FIXME(62277): could be check-pass?)
// edition:2018
#![feature(async_await)]
struct Xyz {
a: u64,
}

View File

@ -1,11 +1,8 @@
// build-pass (FIXME(62277): could be check-pass?)
// edition:2018
#![feature(async_await)]
use std::future::Future;
#[allow(unused)]
async fn enter<'a, F, R>(mut callback: F)
where
F: FnMut(&'a mut i32) -> R,

View File

@ -6,8 +6,6 @@
// compile-flags: --edition=2018
#![feature(async_await)]
pub enum Uninhabited { }
fn uninhabited_async() -> Uninhabited {
@ -16,14 +14,12 @@ fn uninhabited_async() -> Uninhabited {
async fn noop() { }
#[allow(unused)]
async fn contains_never() {
let error = uninhabited_async();
noop().await;
let error2 = error;
}
#[allow(unused)]
async fn overlap_never() {
let error1 = uninhabited_async();
noop().await;
@ -35,6 +31,4 @@ async fn overlap_never() {
#[allow(unused_must_use)]
fn main() {
contains_never();
overlap_never();
}

View File

@ -1,8 +1,6 @@
// build-pass (FIXME(62277): could be check-pass?)
// edition:2018
#![feature(async_await)]
// This is a regression test to ensure that simple bindings (where replacement arguments aren't
// created during async fn lowering) that have their DefId used during HIR lowering (such as impl
// trait) are visited during def collection and thus have a DefId.

View File

@ -3,7 +3,6 @@
// build-pass (FIXME(62277): could be check-pass?)
// edition:2018
#![feature(async_await)]
#![feature(type_alias_impl_trait)]
use std::future::Future;

View File

@ -1,7 +1,6 @@
// aux-build:issue-60674.rs
// build-pass (FIXME(62277): could be check-pass?)
// edition:2018
#![feature(async_await)]
// This is a regression test that ensures that `mut` patterns are not lost when provided as input
// to a proc macro.

View File

@ -1,8 +1,6 @@
// edition:2018
#![feature(async_await)]
fn main() {
}
fn main() {}
async fn response(data: Vec<u8>) {
data.reverse(); //~ ERROR E0596

View File

@ -4,8 +4,6 @@
// Tests that we properly handle StorageDead/StorageLives for temporaries
// created in async loop bodies.
#![feature(async_await)]
async fn bar() -> Option<()> {
Some(())
}

View File

@ -1,7 +1,5 @@
// edition:2018
#![feature(async_await)]
async fn print_dur() {}
fn main() {

View File

@ -1,6 +1,6 @@
// edition:2018
#![feature(async_await, async_closure)]
#![feature(async_closure)]
async fn print_dur() {}

View File

@ -5,8 +5,6 @@
// edition:2018
// check-pass
#![feature(async_await)]
trait FirstTrait {}
trait SecondTrait {
type Item: ?Sized;

View File

@ -5,8 +5,6 @@
// edition:2018
// check-pass
#![feature(async_await)]
trait Object {}
trait Alpha<Param: ?Sized> {}

View File

@ -1,7 +1,5 @@
// edition:2018
#![feature(async_await)]
struct Xyz {
a: u64,
}

View File

@ -1,7 +1,5 @@
// edition:2018
#![feature(async_await)]
struct Xyz {
a: u64,
}

View File

@ -1,8 +1,6 @@
// edition:2018
// check-pass
#![feature(async_await)]
struct Xyz {
a: u64,
}

View File

@ -1,8 +1,6 @@
// check-pass
// edition:2018
#![feature(async_await)]
struct A;
impl A {

View File

@ -1,5 +1,4 @@
// edition:2018
#![feature(async_await)]
async fn do_the_thing() -> u8 {
8

View File

@ -2,8 +2,6 @@
// edition:2018
// compile-flags: --crate-type lib
#![feature(async_await)]
struct Small {
x: Vec<usize>,
y: Vec<usize>,

View File

@ -2,8 +2,6 @@
// edition:2018
// compile-flags: --crate-type lib
#![feature(async_await)]
async fn move_part_await_return_rest_tuple() -> Vec<usize> {
let x = (vec![3], vec![4, 4]);
drop(x.1);

View File

@ -3,8 +3,6 @@
// Test that we can use async fns with multiple arbitrary lifetimes.
#![feature(async_await)]
async fn multiple_elided_lifetimes(_: &u8, _: &u8) {}
fn main() {

View File

@ -3,8 +3,6 @@
// Test that we can use async fns with multiple arbitrary lifetimes.
#![feature(async_await)]
async fn multiple_named_lifetimes<'a, 'b>(_: &'a u8, _: &'b u8, _: fn(&u8)) {}
fn gimme(_: &u8) { }

View File

@ -3,9 +3,6 @@
// Test that we can use async fns with multiple arbitrary lifetimes.
#![feature(async_await)]
#![allow(dead_code)]
use std::ops::Add;
async fn multiple_hrtb_and_single_named_lifetime_ok<'c>(

View File

@ -3,8 +3,6 @@
// Test that we can use async fns with multiple arbitrary lifetimes.
#![feature(async_await)]
async fn multiple_named_lifetimes<'a, 'b>(_: &'a u8, _: &'b u8) {}
fn main() {

View File

@ -1,8 +1,6 @@
// edition:2018
// run-pass
#![feature(async_await)]
async fn lotsa_lifetimes<'a, 'b, 'c>(a: &'a u32, b: &'b u32, c: &'c u32) -> (&'a u32, &'b u32)
where 'b: 'a
{

View File

@ -4,7 +4,7 @@
// Test that a feature gate is needed to use `impl Trait` as the
// return type of an async.
#![feature(async_await, member_constraints)]
#![feature(member_constraints)]
trait Trait<'a, 'b> { }
impl<T> Trait<'_, '_> for T { }

View File

@ -3,8 +3,6 @@
// Test that a feature gate is needed to use `impl Trait` as the
// return type of an async.
#![feature(async_await)]
trait Trait<'a, 'b> { }
impl<T> Trait<'_, '_> for T { }

View File

@ -3,7 +3,7 @@
// Test that a feature gate is needed to use `impl Trait` as the
// return type of an async.
#![feature(async_await, member_constraints)]
#![feature(member_constraints)]
trait Trait<'a> { }
impl<T> Trait<'_> for T { }

View File

@ -4,8 +4,6 @@
// function (which takes multiple lifetimes) only returns data from
// one of them.
#![feature(async_await)]
async fn multiple_named_lifetimes<'a, 'b>(a: &'a u8, _: &'b u8) -> &'a u8 {
a
}

View File

@ -4,9 +4,6 @@
// Test for async fn where the parameters have distinct lifetime
// parameters that appear in all possible variances.
#![feature(async_await)]
#[allow(dead_code)]
async fn lotsa_lifetimes<'a, 'b, 'c>(_: fn(&'a u8), _: fn(&'b u8) -> &'b u8, _: fn() -> &'c u8) { }
fn take_any(_: &u8) { }

View File

@ -4,8 +4,6 @@
// check-pass
// edition:2018
#![feature(async_await)]
struct Foo<'a>(&'a ());
impl<'a> Foo<'a> {

View File

@ -1,6 +1,6 @@
// edition:2018
#![feature(async_await, async_closure)]
#![feature(async_closure)]
fn main() {
let _ = async |x: u8| {};

View File

@ -2,7 +2,5 @@
// edition:2018
// compile-flags: --crate-type lib
#![feature(async_await)]
pub async const fn x() {}
//~^ ERROR expected one of `fn` or `unsafe`, found `const`

View File

@ -2,8 +2,6 @@
// edition:2018
// compile-flags: --crate-type lib
#![feature(async_await)]
pub const async fn x() {}
//~^ ERROR expected identifier, found reserved keyword `async`
//~^^ expected `:`, found keyword `fn`

View File

@ -2,8 +2,6 @@
// edition:2018
// compile-flags: --crate-type lib
#![feature(async_await)]
async fn no_move_across_await_struct() -> Vec<usize> {
let s = Small { x: vec![31], y: vec![19, 1441] };
needs_vec(s.x).await;

View File

@ -2,8 +2,6 @@
// edition:2018
// compile-flags: --crate-type lib
#![feature(async_await)]
async fn no_move_across_await_tuple() -> Vec<usize> {
let x = (vec![3], vec![4, 4]);
drop(x.1);

View File

@ -2,8 +2,6 @@
// edition:2018
// compile-flags: --crate-type lib
#![feature(async_await)]
async fn no_non_guaranteed_initialization(x: usize) -> usize {
let y;
if x > 5 {

View File

@ -3,8 +3,6 @@
// edition:2018
#![feature(async_await)]
struct S { x: i32, y: i32 }
struct T(i32, i32);

View File

@ -2,8 +2,6 @@
// Test that impl trait does not allow creating recursive types that are
// otherwise forbidden when using `async` and `await`.
#![feature(async_await)]
async fn recursive_async_function() -> () { //~ ERROR
recursive_async_function().await;
}

View File

@ -1,7 +1,7 @@
// edition:2018
// run-rustfix
#![feature(async_await, async_closure)]
#![feature(async_closure)]
fn take_u32(_x: u32) {}

View File

@ -1,8 +1,6 @@
// edition:2018
// run-rustfix
#![feature(async_await)]
fn take_u32(_x: u32) {}
async fn make_u32() -> u32 {

View File

@ -2,7 +2,7 @@
// Error message should pinpoint the type parameter T as needing to be bound
// (rather than give a general error message)
// edition:2018
#![feature(async_await)]
async fn bar<T>() -> () {}
async fn foo() {

View File

@ -7,10 +7,7 @@
// edition:2018
// ignore-wasm32-bare compiled with panic=abort by default
#![allow(unused_assignments)]
#![allow(unused_variables)]
#![feature(slice_patterns)]
#![feature(async_await)]
use std::{
cell::{Cell, RefCell},

View File

@ -4,7 +4,7 @@
// check-pass
// edition:2018
#![feature(async_await, generators, generator_trait)]
#![feature(generators, generator_trait)]
use std::ops::Generator;

View File

@ -4,7 +4,6 @@
// check-pass
// edition:2018
#![feature(async_await)]
use std::future::Future;
pub trait T {

View File

@ -2,7 +2,6 @@
// ignore-tidy-linelength
// edition:2018
#![feature(async_await)]
#![feature(impl_trait_in_bindings)]
//~^ WARNING the feature `impl_trait_in_bindings` is incomplete

View File

@ -1,7 +1,6 @@
// check-pass
// edition:2018
#![feature(async_await)]
#![feature(type_alias_impl_trait)]
#![feature(impl_trait_in_bindings)]
//~^ WARNING the feature `impl_trait_in_bindings` is incomplete

View File

@ -1,6 +1,7 @@
// edition:2018
// ignore-tidy-linelength
#![feature(async_await, type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]
pub trait Bar {
type E: Copy;

View File

@ -1,5 +1,4 @@
// edition:2018
#![feature(async_await)]
#![feature(impl_trait_in_bindings)]
//~^ WARN the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash

View File

@ -1,5 +1,4 @@
// edition:2018
#![feature(async_await)]
use std::io::Error;

View File

@ -3,7 +3,7 @@
// Exercise the unused_mut attribute in some positive and negative cases
#![deny(unused_mut)]
#![feature(async_await, async_closure, param_attrs)]
#![feature(async_closure, param_attrs)]
async fn baz_async(
mut a: i32,

View File

@ -1,7 +1,7 @@
// compile-flags: --cfg something
// edition:2018
#![feature(async_await, async_closure, param_attrs)]
#![feature(async_closure, param_attrs)]
#![deny(unused_variables)]
async fn foo_async(

View File

@ -1,7 +1,7 @@
// compile-flags: --cfg something
// edition:2018
#![feature(async_await, async_closure, param_attrs)]
#![feature(async_closure, param_attrs)]
#![deny(unused_variables)]
extern "C" {

View File

@ -1,8 +1,6 @@
// check-pass
// edition:2018
#![feature(async_await)]
use std::pin::Pin;
use std::task::{Context, Poll};

View File

@ -1,7 +1,5 @@
// edition:2018
#![feature(async_await)]
use std::pin::Pin;
struct Foo;

View File

@ -1,7 +1,5 @@
// edition:2018
#![feature(async_await)]
use std::pin::Pin;
struct Foo;

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