Skip to content

Commit

Permalink
Remove async_await gates from tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Aug 20, 2019
1 parent 6a14411 commit 228015a
Show file tree
Hide file tree
Showing 118 changed files with 19 additions and 224 deletions.
2 changes: 0 additions & 2 deletions src/test/rustdoc/async-fn.rs
@@ -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
Expand Down
6 changes: 2 additions & 4 deletions src/test/rustdoc/async-move-doctest.rs
@@ -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 {});
//! }
Expand Down
3 changes: 0 additions & 3 deletions src/test/rustdoc/edition-flag.rs
@@ -1,10 +1,7 @@
// compile-flags:--test -Z unstable-options
// edition:2018

#![feature(async_await)]

/// ```rust
/// #![feature(async_await)]
/// fn main() {
/// let _ = async { };
/// }
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/async-await/argument-patterns.rs
Expand Up @@ -3,7 +3,6 @@

#![allow(unused_variables)]
#![deny(unused_mut)]
#![feature(async_await)]

type A = Vec<u32>;

Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/async-await/async-await.rs
Expand Up @@ -3,8 +3,6 @@
// edition:2018
// aux-build:arc_wake.rs

#![feature(async_await)]

extern crate arc_wake;

use std::pin::Pin;
Expand Down
Expand Up @@ -6,8 +6,6 @@
// edition:2018
// ignore-tidy-linelength

#![feature(async_await)]

fn main() {}

use core::future::Future;
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/async-await/async-closure-matches-expr.rs
@@ -1,7 +1,7 @@
// build-pass
// edition:2018

#![feature(async_await, async_closure)]
#![feature(async_closure)]

macro_rules! match_expr {
($x:expr) => {}
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/async-await/async-closure.rs
Expand Up @@ -3,7 +3,7 @@
// edition:2018
// aux-build:arc_wake.rs

#![feature(async_await, async_closure)]
#![feature(async_closure)]

extern crate arc_wake;

Expand Down
3 changes: 1 addition & 2 deletions src/test/ui/async-await/async-error-span.rs
@@ -1,7 +1,6 @@
// edition:2018
#![feature(async_await)]

// Regression test for issue #62382
// Regression test for issue #62382.

use std::future::Future;

Expand Down
Expand Up @@ -6,8 +6,6 @@
// check-pass
// edition:2018

#![feature(async_await)]

struct Foo<'a>(&'a u8);

impl Foo<'_> {
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/async-await/async-fn-nonsend.rs
Expand Up @@ -2,8 +2,6 @@
// edition:2018
// compile-flags: --crate-type lib

#![feature(async_await)]

use std::{
cell::RefCell,
fmt::Debug,
Expand Down
3 changes: 0 additions & 3 deletions src/test/ui/async-await/async-fn-path-elision.rs
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/async-await/async-fn-send-uses-nonsend.rs
Expand Up @@ -2,8 +2,6 @@
// edition:2018
// compile-flags: --crate-type lib

#![feature(async_await)]

use std::{
cell::RefCell,
fmt::Debug,
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/async-await/async-fn-size-moved-locals.rs
Expand Up @@ -12,8 +12,6 @@

// edition:2018

#![feature(async_await)]

use std::future::Future;
use std::pin::Pin;
use std::task::{Context, Poll};
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/async-await/async-fn-size.rs
Expand Up @@ -2,8 +2,6 @@
// aux-build:arc_wake.rs
// edition:2018

#![feature(async_await)]

extern crate arc_wake;

use std::pin::Pin;
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/async-await/async-matches-expr.rs
@@ -1,8 +1,6 @@
// build-pass (FIXME(62277): could be check-pass?)
// edition:2018

#![feature(async_await)]

macro_rules! match_expr {
($x:expr) => {}
}
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/async-await/async-unsafe-fn-call-in-safe.rs
@@ -1,7 +1,5 @@
// edition:2018

#![feature(async_await)]

struct S;

impl S {
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/async-await/async-with-closure.rs
@@ -1,8 +1,6 @@
// build-pass (FIXME(62277): could be check-pass?)
// edition:2018

#![feature(async_await)]

trait MyClosure {
type Args;
}
Expand Down
@@ -1,4 +1,3 @@
#![feature(async_await)]
#![allow(non_camel_case_types)]
#![deny(keyword_idents)]

Expand Down
@@ -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`
Expand Down
@@ -1,7 +1,5 @@
// edition:2018

#![feature(async_await)]

async fn bar() -> Result<(), ()> {
Ok(())
}
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/async-await/await-unsize.rs
Expand Up @@ -3,8 +3,6 @@
// check-pass
// edition:2018

#![feature(async_await)]

async fn make_boxed_object() -> Box<dyn Send> {
Box::new(()) as _
}
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/async-await/bound-normalization.rs
@@ -1,8 +1,6 @@
// check-pass
// edition:2018

#![feature(async_await)]

// See issue 60414

trait Trait {
Expand Down
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/async-await/dont-print-desugared-async.rs
@@ -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]
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/async-await/dont-suggest-missing-await.rs
Expand Up @@ -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 {
Expand Down
Expand Up @@ -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.
Expand Down
Expand Up @@ -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.
Expand Down
Expand Up @@ -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;
Expand Down
@@ -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]
Expand Down
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/async-await/edition-deny-async-fns-2015.rs
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/async-await/generics-and-bounds.rs
Expand Up @@ -2,8 +2,6 @@
// edition:2018
// compile-flags: --crate-type lib

#![feature(async_await)]

use std::future::Future;

pub async fn simple_generic<T>() {}
Expand Down
3 changes: 0 additions & 3 deletions src/test/ui/async-await/issue-60709.rs
Expand Up @@ -4,9 +4,6 @@

// run-pass

#![feature(async_await)]
#![allow(unused)]

use std::future::Future;
use std::task::Poll;
use std::task::Context;
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/async-await/issue-61452.rs
@@ -1,5 +1,4 @@
// edition:2018
#![feature(async_await)]

pub async fn f(x: Option<usize>) {
x.take();
Expand Down
3 changes: 0 additions & 3 deletions src/test/ui/async-await/issue-61793.rs
Expand Up @@ -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() {
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/async-await/issue-61949-self-return-type.rs
@@ -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.

Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/async-await/issue-62658.rs
Expand Up @@ -4,8 +4,6 @@
// build-pass
// edition:2018

#![feature(async_await)]

async fn noop() {}

async fn foo() {
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/async-await/issues/issue-51719.rs
Expand Up @@ -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() {
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/async-await/issues/issue-51751.rs
@@ -1,7 +1,5 @@
// edition:2018

#![feature(async_await)]

async fn inc(limit: i64) -> i64 {
limit + 1
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/async-await/issues/issue-53249.rs
@@ -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;
Expand Down
3 changes: 0 additions & 3 deletions src/test/ui/async-await/issues/issue-54752-async-block.rs
Expand Up @@ -3,7 +3,4 @@
// edition:2018
// pp-exact

#![feature(async_await)]
#![allow(unused_parens)]

fn main() { let _a = (async { }); }
2 changes: 0 additions & 2 deletions src/test/ui/async-await/issues/issue-54974.rs
@@ -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 {
Expand Down
3 changes: 0 additions & 3 deletions src/test/ui/async-await/issues/issue-55324.rs
@@ -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
Expand Down

0 comments on commit 228015a

Please sign in to comment.