Skip to content

Rollup of 29 pull requests #56325

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

Closed
wants to merge 79 commits into from
Closed
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
32d07cc
bootstrap: be more explicit on what we collect into. NFC
matthiaskrgr Oct 26, 2018
cc63bd4
atomic::Ordering: Get rid of misleading parts of intro
vorner Nov 17, 2018
7dc0dd2
Drop function parameters in expected order
matthewjasper Nov 18, 2018
28cc944
Reduce the amount of bold text at doc.rust-lang.org
mark-i-m Nov 19, 2018
6674db4
Reuse the `P` in `InvocationCollector::fold_{,opt_}expr`.
nnethercote Nov 20, 2018
b99f9f7
Enclose type in backticks for "non-exhaustive patterns" error
varkor Nov 20, 2018
464c9da
serialize: preallocate VecDeque in Decodable::decode
ljedrz Nov 21, 2018
591607d
String: add a FIXME to from_utf16
ljedrz Nov 21, 2018
1ed9195
fix small doc mistake
antoine-de Nov 21, 2018
83388e8
Update an outdated comment in mir building
oli-obk Nov 21, 2018
5a2a251
Update as_temp.rs
oli-obk Nov 21, 2018
925274a
Update as_temp.rs
oli-obk Nov 21, 2018
f039872
Enclose type in backticks for "reached the recursion limit while auto…
varkor Nov 21, 2018
ec3ac11
Make std::os::unix/linux::fs::MetadataExt::a/m/ctime* documentation c…
ariasuni Nov 21, 2018
af9b057
drop glue takes in mutable references, it should reflect that in its …
RalfJung Nov 22, 2018
e1ca4f6
fix codegen-units tests
RalfJung Nov 22, 2018
d9de72f
miri: restrict fn argument punning to Rust ABI
RalfJung Nov 22, 2018
5c99ae6
Fix ICE with feature self_struct_ctor
estebank Nov 25, 2018
8d76f54
Use opt_def_id instead of having special branch
estebank Nov 25, 2018
79ee8f3
Suggest appropriate place for lifetime when declared after type argum…
estebank Nov 25, 2018
234d043
Move lifetimes before the *first* type argument
estebank Nov 25, 2018
db8540e
Avoid a useless `FxHashSet::insert` in `FileSearch::for_each_lib_sear…
nnethercote Nov 21, 2018
145e2ab
Remove `Session::sysroot()`.
nnethercote Nov 22, 2018
057e6d3
Add TryFrom<&[T]> for [T; $N] where T: Copy
SimonSapin Nov 25, 2018
8e75844
Introduce `SearchPath` and replace `SearchPaths` with `Vec<SearchPath>`.
nnethercote Nov 22, 2018
ca82a82
Avoid regenerating the `Vec<PathBuf>` in `FileSearch::search()`.
nnethercote Nov 20, 2018
2d2b7c0
Make JSON output from -Zprofile-json valid
Mark-Simulacrum Nov 25, 2018
4dd0f66
Replace `FileSearch::for_each_lib_search_path` with `search_paths`.
nnethercote Nov 23, 2018
cc46685
Remove unsafe `unsafe` inner function.
frewsxcv Nov 26, 2018
45dfe43
Emit one diagnostic for multiple misplaced lifetimes
estebank Nov 26, 2018
769d711
add test for issue #21335
euclio Nov 14, 2018
cd20be5
Update outdated code comments in StringReader
jasonl Nov 26, 2018
a1865ed
Add rustc-guide as a submodule
mark-i-m Nov 22, 2018
6494f1e
rustc-guide has moved
mark-i-m Nov 26, 2018
6f028fe
Specify suggestion applicability
estebank Nov 26, 2018
d4a6e73
Use sort_by_cached_key when key the function is not trivial/free
ljedrz Nov 9, 2018
6739c0e
Add missing doc link
GuillaumeGomez Nov 27, 2018
a8f9302
avoid features_untracked
RalfJung Nov 17, 2018
c4e0b89
move stage0.txt to toplevel directory
Keruspe Nov 24, 2018
73b656b
Fix small typo in comment
marius Nov 27, 2018
c75ed34
move feature gate to accepted
mark-i-m Nov 24, 2018
a542e48
remove feature gate
mark-i-m Nov 24, 2018
32aafb2
remove some unused vars
mark-i-m Nov 24, 2018
e97edad
update tests
mark-i-m Nov 24, 2018
f3b29ca
remove unstable book entry
mark-i-m Nov 24, 2018
59ae93d
remove uses of feature gate
mark-i-m Nov 24, 2018
aeede9e
fix test
mark-i-m Nov 25, 2018
e63bd91
Fix a typo in the documentation of std::ffi
polyfloyd Nov 27, 2018
d8190af
Fix alignment of stores to scalar pair
nikic Nov 27, 2018
5d77173
fix test
mark-i-m Nov 28, 2018
2ac258a
Rollup merge of #55391 - matthiaskrgr:bootstrap_cleanup, r=TimNN
pietroalbini Nov 28, 2018
c1f15da
Rollup merge of #55821 - ljedrz:cached_key_sorts, r=michaelwoerister
pietroalbini Nov 28, 2018
7bed15f
Rollup merge of #56014 - euclio:issue-21335, r=nagisa
pietroalbini Nov 28, 2018
21c77dc
Rollup merge of #56021 - RalfJung:track-features, r=oli-obk
pietroalbini Nov 28, 2018
c286be5
Rollup merge of #56023 - vorner:doc/atomic-ordering-strip, r=@stjepang
pietroalbini Nov 28, 2018
fa335e9
Rollup merge of #56044 - matthewjasper:function-param-drop-order, r=c…
pietroalbini Nov 28, 2018
6ca10ea
Rollup merge of #56080 - mark-i-m:patch-2, r=steveklabnik
pietroalbini Nov 28, 2018
0789658
Rollup merge of #56090 - nnethercote:filesearch, r=eddyb
pietroalbini Nov 28, 2018
962e210
Rollup merge of #56114 - varkor:nonexhaustive-backticks, r=nikomatsakis
pietroalbini Nov 28, 2018
5fc9d68
Rollup merge of #56124 - antoine-de:fix_read_to_end_doc_mistake, r=TimNN
pietroalbini Nov 28, 2018
084e837
Rollup merge of #56127 - rust-lang:oli-obk-patch-1, r=nikomatsakis
pietroalbini Nov 28, 2018
d9b5980
Rollup merge of #56131 - ljedrz:assorted, r=RalfJung
pietroalbini Nov 28, 2018
5503033
Rollup merge of #56148 - mark-i-m:rustc-guide-submodule, r=nikomatsakis
pietroalbini Nov 28, 2018
d77bbb4
Rollup merge of #56149 - ariasuni:improve-amctime-doc, r=TimNN
pietroalbini Nov 28, 2018
b2ad3e2
Rollup merge of #56165 - RalfJung:drop-glue-type, r=eddyb,nikomatsakis
pietroalbini Nov 28, 2018
9642325
Rollup merge of #56205 - estebank:ice-ice-baby, r=nikomatsakis
pietroalbini Nov 28, 2018
6e25cfb
Rollup merge of #56216 - SimonSapin:array-tryfrom-slice, r=withoutboats
pietroalbini Nov 28, 2018
2a07404
Rollup merge of #56220 - estebank:suggest-lifetime-move, r=nikomatsakis
pietroalbini Nov 28, 2018
26bc763
Rollup merge of #56223 - Mark-Simulacrum:self-profile-json, r=wesleyw…
pietroalbini Nov 28, 2018
2faaa35
Rollup merge of #56236 - frewsxcv:frewsxcv-unsafe-unsafe, r=cramertj
pietroalbini Nov 28, 2018
24e6fb2
Rollup merge of #56245 - mark-i-m:stabilize_ques_kleene, r=alexcrichton
pietroalbini Nov 28, 2018
ee531da
Rollup merge of #56255 - jasonl:update-old-documents, r=michaelwoerister
pietroalbini Nov 28, 2018
a524143
Rollup merge of #56257 - mark-i-m:rustc-guide-links, r=nikomatsakis
pietroalbini Nov 28, 2018
70567f6
Rollup merge of #56268 - nnethercote:fold_opt_expr-recycle, r=petroch…
pietroalbini Nov 28, 2018
19b10fc
Rollup merge of #56273 - GuillaumeGomez:iterator-fnmut-missing-link, …
pietroalbini Nov 28, 2018
e9fc4ba
Rollup merge of #56285 - Keruspe:stage0, r=alexcrichton
pietroalbini Nov 28, 2018
ebefb1a
Rollup merge of #56289 - marius:patch-1, r=cramertj
pietroalbini Nov 28, 2018
1a4bb2b
Rollup merge of #56294 - polyfloyd:fix-typo-ffi-doc, r=sfackler
pietroalbini Nov 28, 2018
a6e3e85
Rollup merge of #56300 - nikic:issue-56267, r=eddyb
pietroalbini Nov 28, 2018
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

This file was deleted.

1 change: 0 additions & 1 deletion src/doc/unstable-book/src/language-features/plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ that warns about any item named `lintme`.
```rust,ignore
#![feature(plugin_registrar)]
#![feature(box_syntax, rustc_private)]
#![feature(macro_at_most_once_rep)]

extern crate syntax;

Expand Down
1 change: 0 additions & 1 deletion src/libcore/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
#![feature(never_type)]
#![feature(nll)]
#![feature(exhaustive_patterns)]
#![feature(macro_at_most_once_rep)]
#![feature(no_core)]
#![feature(on_unimplemented)]
#![feature(optin_builtin_traits)]
Expand Down
1 change: 0 additions & 1 deletion src/librustc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
#![feature(integer_atomics)]
#![feature(test)]
#![feature(in_band_lifetimes)]
#![feature(macro_at_most_once_rep)]
#![feature(crate_visibility_modifier)]
#![feature(transpose_result)]

Expand Down
1 change: 0 additions & 1 deletion src/librustc_lint/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#![feature(nll)]
#![feature(quote)]
#![feature(rustc_diagnostic_macros)]
#![feature(macro_at_most_once_rep)]

#[macro_use]
extern crate syntax;
Expand Down
1 change: 0 additions & 1 deletion src/librustc_metadata/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#![feature(box_patterns)]
#![feature(libc)]
#![feature(macro_at_most_once_rep)]
#![feature(nll)]
#![feature(proc_macro_internals)]
#![feature(proc_macro_quote)]
Expand Down
58 changes: 13 additions & 45 deletions src/libsyntax/ext/tt/quoted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
use ast::NodeId;
use early_buffered_lints::BufferedEarlyLintId;
use ext::tt::macro_parser;
use feature_gate::{self, emit_feature_err, Features, GateIssue};
use feature_gate::Features;
use parse::{token, ParseSess};
use print::pprust;
use symbol::keywords;
use syntax_pos::{edition::Edition, BytePos, Span};
use tokenstream::{self, DelimSpan};
use {ast, attr};
use ast;

use rustc_data_structures::sync::Lrc;
use std::iter::Peekable;
Expand Down Expand Up @@ -566,32 +566,17 @@ fn parse_sep_and_kleene_op_2018<I>(
input: &mut Peekable<I>,
span: Span,
sess: &ParseSess,
features: &Features,
attrs: &[ast::Attribute],
_features: &Features,
_attrs: &[ast::Attribute],
) -> (Option<token::Token>, KleeneOp)
where
I: Iterator<Item = tokenstream::TokenTree>,
{
// We basically look at two token trees here, denoted as #1 and #2 below
let span = match parse_kleene_op(input, span) {
// #1 is a `?` (needs feature gate)
Ok(Ok((op, op1_span))) if op == KleeneOp::ZeroOrOne => {
if !features.macro_at_most_once_rep
&& !attr::contains_name(attrs, "allow_internal_unstable")
{
let explain = feature_gate::EXPLAIN_MACRO_AT_MOST_ONCE_REP;
emit_feature_err(
sess,
"macro_at_most_once_rep",
op1_span,
GateIssue::Language,
explain,
);

op1_span
} else {
return (None, op);
}
Ok(Ok((op, _op1_span))) if op == KleeneOp::ZeroOrOne => {
return (None, op);
}

// #1 is a `+` or `*` KleeneOp
Expand All @@ -600,24 +585,12 @@ where
// #1 is a separator followed by #2, a KleeneOp
Ok(Err((tok, span))) => match parse_kleene_op(input, span) {
// #2 is the `?` Kleene op, which does not take a separator (error)
Ok(Ok((op, op2_span))) if op == KleeneOp::ZeroOrOne => {
Ok(Ok((op, _op2_span))) if op == KleeneOp::ZeroOrOne => {
// Error!

if !features.macro_at_most_once_rep
&& !attr::contains_name(attrs, "allow_internal_unstable")
{
// FIXME: when `?` as a Kleene op is stabilized, we only need the "does not
// take a macro separator" error (i.e. the `else` case).
sess.span_diagnostic
.struct_span_err(op2_span, "expected `*` or `+`")
.note("`?` is not a macro repetition operator")
.emit();
} else {
sess.span_diagnostic.span_err(
span,
"the `?` macro repetition operator does not take a separator",
);
}
sess.span_diagnostic.span_err(
span,
"the `?` macro repetition operator does not take a separator",
);

// Return a dummy
return (None, KleeneOp::ZeroOrMore);
Expand All @@ -638,13 +611,8 @@ where
};

// If we ever get to this point, we have experienced an "unexpected token" error

if !features.macro_at_most_once_rep && !attr::contains_name(attrs, "allow_internal_unstable") {
sess.span_diagnostic.span_err(span, "expected `*` or `+`");
} else {
sess.span_diagnostic
.span_err(span, "expected one of: `*`, `+`, or `?`");
}
sess.span_diagnostic
.span_err(span, "expected one of: `*`, `+`, or `?`");

// Return a dummy
(None, KleeneOp::ZeroOrMore)
Expand Down
8 changes: 2 additions & 6 deletions src/libsyntax/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,6 @@ declare_features! (
// `extern` in paths
(active, extern_in_paths, "1.23.0", Some(55600), None),

// Use `?` as the Kleene "at most one" operator
(active, macro_at_most_once_rep, "1.25.0", Some(48075), None),

// Infer static outlives requirements; RFC 2093
(active, infer_static_outlives_requirements, "1.26.0", Some(54185), None),

Expand Down Expand Up @@ -689,6 +686,8 @@ declare_features! (
(accepted, extern_crate_item_prelude, "1.31.0", Some(55599), None),
// Allows use of the :literal macro fragment specifier (RFC 1576)
(accepted, macro_literal_matcher, "1.31.0", Some(35625), None),
// Use `?` as the Kleene "at most one" operator
(accepted, macro_at_most_once_rep, "1.32.0", Some(48075), None),
);

// If you change this, please modify src/doc/unstable-book as well. You must
Expand Down Expand Up @@ -1427,9 +1426,6 @@ pub const EXPLAIN_DERIVE_UNDERSCORE: &'static str =
pub const EXPLAIN_UNSIZED_TUPLE_COERCION: &'static str =
"unsized tuple coercion is not stable enough for use and is subject to change";

pub const EXPLAIN_MACRO_AT_MOST_ONCE_REP: &'static str =
"using the `?` macro Kleene operator for \"at most one\" repetition is unstable";

struct PostExpansionVisitor<'a> {
context: &'a Context<'a>,
}
Expand Down
1 change: 0 additions & 1 deletion src/libsyntax/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
test(attr(deny(warnings))))]

#![feature(crate_visibility_modifier)]
#![feature(macro_at_most_once_rep)]
#![feature(nll)]
#![feature(rustc_attrs)]
#![feature(rustc_diagnostic_macros)]
Expand Down
1 change: 0 additions & 1 deletion src/test/compile-fail-fulldeps/auxiliary/lint_for_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#![feature(plugin_registrar, rustc_private)]
#![feature(box_syntax)]
#![feature(macro_at_most_once_rep)]

#[macro_use] extern crate rustc;
extern crate rustc_plugin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#![feature(plugin_registrar)]
#![feature(box_syntax, rustc_private)]
#![feature(macro_at_most_once_rep)]

// Load rustc as a plugin to get macros
#[macro_use]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#![feature(plugin_registrar)]
#![feature(box_syntax, rustc_private)]
#![feature(macro_at_most_once_rep)]

extern crate syntax;

Expand Down
1 change: 0 additions & 1 deletion src/test/run-pass-fulldeps/auxiliary/lint_for_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#![feature(plugin_registrar, rustc_private)]
#![feature(box_syntax)]
#![feature(macro_at_most_once_rep)]

#[macro_use] extern crate rustc;
extern crate rustc_plugin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
// except according to those terms.

#![feature(box_syntax, plugin, plugin_registrar, rustc_private)]
#![feature(macro_at_most_once_rep)]
#![crate_type = "dylib"]

#[macro_use]
Expand Down
2 changes: 0 additions & 2 deletions src/test/run-pass/macros/macro-at-most-once-rep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

// edition:2018

#![feature(macro_at_most_once_rep)]

macro_rules! foo {
($($a:ident)? ; $num:expr) => { {
let mut x = 0;
Expand Down
1 change: 0 additions & 1 deletion src/test/ui-fulldeps/auxiliary/lint_group_plugin_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#![feature(plugin_registrar)]
#![feature(box_syntax, rustc_private)]
#![feature(macro_at_most_once_rep)]

// Load rustc as a plugin to get macros
#[macro_use]
Expand Down
1 change: 0 additions & 1 deletion src/test/ui-fulldeps/auxiliary/lint_plugin_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#![feature(plugin_registrar)]
#![feature(box_syntax, rustc_private)]
#![feature(macro_at_most_once_rep)]

extern crate syntax;

Expand Down
1 change: 0 additions & 1 deletion src/test/ui-fulldeps/auxiliary/lint_tool_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#![feature(plugin_registrar)]
#![feature(box_syntax, rustc_private)]
#![feature(macro_at_most_once_rep)]

extern crate syntax;

Expand Down

This file was deleted.

This file was deleted.

45 changes: 0 additions & 45 deletions src/test/ui/macros/macro-at-most-once-rep-2018-feature-gate.rs

This file was deleted.

Loading