Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize the loop_break_value feature #42016

Merged
merged 1 commit into from
May 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/doc/unstable-book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
- [link_llvm_intrinsics](language-features/link-llvm-intrinsics.md)
- [linkage](language-features/linkage.md)
- [log_syntax](language-features/log-syntax.md)
- [loop_break_value](language-features/loop-break-value.md)
- [macro_reexport](language-features/macro-reexport.md)
- [macro_vis_matcher](language-features/macro-vis-matcher.md)
- [main](language-features/main.md)
Expand Down
83 changes: 0 additions & 83 deletions src/doc/unstable-book/src/language-features/loop-break-value.md

This file was deleted.

2 changes: 1 addition & 1 deletion src/librustc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#![feature(core_intrinsics)]
#![feature(i128_type)]
#![feature(libc)]
#![feature(loop_break_value)]
#![feature(never_type)]
#![feature(nonzero)]
#![feature(quote)]
Expand All @@ -45,6 +44,7 @@
#![cfg_attr(stage0, unstable(feature = "rustc_private", issue = "27812"))]
#![cfg_attr(stage0, feature(rustc_private))]
#![cfg_attr(stage0, feature(staged_api))]
#![cfg_attr(stage0, feature(loop_break_value))]

#![recursion_limit="128"]

Expand Down
2 changes: 1 addition & 1 deletion src/librustc_driver/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#![deny(warnings)]

#![feature(box_syntax)]
#![feature(loop_break_value)]
#![feature(libc)]
#![feature(quote)]
#![feature(rustc_diagnostic_macros)]
Expand All @@ -32,6 +31,7 @@
#![cfg_attr(stage0, unstable(feature = "rustc_private", issue = "27812"))]
#![cfg_attr(stage0, feature(rustc_private))]
#![cfg_attr(stage0, feature(staged_api))]
#![cfg_attr(stage0, feature(loop_break_value))]

extern crate arena;
extern crate getopts;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ This API is completely unstable and subject to change.
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(conservative_impl_trait)]
#![feature(loop_break_value)]
#![feature(never_type)]
#![feature(quote)]
#![feature(rustc_diagnostic_macros)]

#![cfg_attr(stage0, unstable(feature = "rustc_private", issue = "27812"))]
#![cfg_attr(stage0, feature(rustc_private))]
#![cfg_attr(stage0, feature(staged_api))]
#![cfg_attr(stage0, feature(loop_break_value))]

#[macro_use] extern crate log;
#[macro_use] extern crate syntax;
Expand Down
9 changes: 2 additions & 7 deletions src/libsyntax/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,6 @@ declare_features! (

(active, use_extern_macros, "1.15.0", Some(35896)),

// Allows `break {expr}` with a value inside `loop`s.
(active, loop_break_value, "1.14.0", Some(37339)),

// Allows #[target_feature(...)]
(active, target_feature, "1.15.0", None),

Expand Down Expand Up @@ -423,6 +420,8 @@ declare_features! (
(accepted, pub_restricted, "1.18.0", Some(32409)),
// The #![windows_subsystem] attribute
(accepted, windows_subsystem, "1.18.0", Some(37499)),
// Allows `break {expr}` with a value inside `loop`s.
(accepted, loop_break_value, "1.19.0", Some(37339)),
);
// If you change this, please modify src/doc/unstable-book as well. You must
// move that documentation into the relevant place in the other docs, and
Expand Down Expand Up @@ -1301,10 +1300,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
}
}
}
ast::ExprKind::Break(_, Some(_)) => {
gate_feature_post!(&self, loop_break_value, e.span,
"`break` with a value is experimental");
}
ast::ExprKind::Lit(ref lit) => {
if let ast::LitKind::Int(_, ref ty) = lit.node {
match *ty {
Expand Down
15 changes: 0 additions & 15 deletions src/test/compile-fail/feature-gate-loop-break-value.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/test/compile-fail/loop-break-value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(loop_break_value)]
#![feature(never_type)]

fn main() {
Expand Down
1 change: 0 additions & 1 deletion src/test/run-pass/diverging-fallback-control-flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// like to revisit these and potentially change them. --nmatsakis

#![feature(never_type)]
#![feature(loop_break_value)]

trait BadDefault {
fn default() -> Self;
Expand Down
1 change: 0 additions & 1 deletion src/test/run-pass/loop-break-value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(loop_break_value)]
#![feature(never_type)]

#[allow(unused)]
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/loop-break-value-no-repeat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(loop_break_value)]
#![allow(unused_variables)]

use std::ptr;
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/loop-break-value-no-repeat.stderr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error[E0571]: `break` with value from a `for` loop
--> $DIR/loop-break-value-no-repeat.rs:23:9
--> $DIR/loop-break-value-no-repeat.rs:22:9
|
23 | break 22
22 | break 22
| ^^^^^^^^ can only break with a value inside `loop`

error: aborting due to previous error
Expand Down