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

Rollup of 7 pull requests #63028

Closed
wants to merge 48 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
44bf6b6
tests: Add minimal reproduction of #61963.
davidtwco Jul 20, 2019
5d11755
Add 'ast::PatKind::Rest'.
Centril Jul 6, 2019
9d6684c
Introduce 'ast::Pat::is_rest(&self) -> bool'.
Centril Jul 9, 2019
aa945e3
Adjust 'ast::PatKind::{TupleStruct,Tuple,Slice}'.
Centril Jul 9, 2019
786797d
Adjust feature gating of subslice patterns accordingly.
Centril Jul 9, 2019
02ef849
Adjust pretty printing accordingly.
Centril Jul 9, 2019
4dcc713
Adjust and document 'Pat::to_ty' accordingly.
Centril Jul 9, 2019
634ebd5
Adjust lowering of Tuple/TupleStruct patterns.
Centril Jul 9, 2019
5c002ac
Adjust lowering of Slice patterns.
Centril Jul 9, 2019
33421de
Cleanup parse_seq_* methods + record trailing separators.
Centril Jul 9, 2019
de3ae62
Add more parse_*_seq methods for code reuse.
Centril Jul 9, 2019
77d8752
Cleanup using the new parse_*_seq methods.
Centril Jul 9, 2019
6bfba39
Adjust parsing of Slice, Tuple, TupleStruct patterns.
Centril Jul 9, 2019
cde05d3
Recover on '..X' / '..=X' / '...X' range patterns.
Centril Jul 9, 2019
036c683
Recover on 'X..' / 'X..=' / 'X...' range patterns.
Centril Jul 9, 2019
557c81b
Update tests wrt. recovery of range patterns.
Centril Jul 9, 2019
61eab52
And also --bless those recovery tests.
Centril Jul 9, 2019
179de7c
Test parsing and recovery of all sorts of range patterns.
Centril Jul 9, 2019
98d6269
Use new 'p @ ..' syntax in tests.
Centril Jul 7, 2019
7fef614
--bless tests due to new subslice syntax.
Centril Jul 7, 2019
9e084f2
Intersection patterns 'p1 @ p2' are not supported.
Centril Jul 8, 2019
8a481ef
Account for better recovery in two cases.
Centril Jul 9, 2019
7cd4144
(pat, ..,) is now syntactically legal.
Centril Jul 8, 2019
2e6e6a9
Win some lose some; Unfortunately we lost recovery in one case.
Centril Jul 8, 2019
bc88063
Update unstable book wrt. subslice patterns.
Centril Jul 10, 2019
7a7146c
Adjust documentation in HAIR.
Centril Jul 10, 2019
1922656
Get out of bootstrapping pickle.
Centril Jul 10, 2019
165951b
--bless tests after rebase.
Centril Jul 10, 2019
3d8c561
Update error_codes.rs with new subslice syntax.
Centril Jul 10, 2019
efdbb87
Use AstP more in lowering.
Centril Jul 11, 2019
2d4c4c9
Address comments in lowering + parsing.
Centril Jul 24, 2019
0569970
Address comments re. off-topic errors.
Centril Jul 24, 2019
6748878
Add exceptions for ExprKind::Err/TyKind::Error.
Centril Jul 24, 2019
9cde1db
And --bless tests accordingly for those exceptions.
Centril Jul 24, 2019
4242206
Re-enable assertions in PPC dist builder
mati865 Jul 19, 2019
c7a599e
bump crossbeam-epoch dependency
RalfJung Jul 25, 2019
eb4fbda
Simplify save-analysis JSON dumper interface
Mark-Simulacrum Jul 25, 2019
68c0ba2
Rename JsonDumper to Dumper
Mark-Simulacrum Jul 25, 2019
8eaf17b
Introduce built-in macros through libcore
petrochenkov Jun 20, 2019
d7b2110
add repr(transparent) to IoSliceMut where missing
nivkner Jul 26, 2019
cae8680
lowering: Omit bare trait lint on macro call sites
davidtwco Jul 26, 2019
c5c5534
Rollup merge of #62086 - petrochenkov:builtout, r=eddyb
Centril Jul 26, 2019
63ec331
Rollup merge of #62550 - Centril:rest-patterns, r=petrochenkov
Centril Jul 26, 2019
2fa3e20
Rollup merge of #62949 - mati865:patch-1, r=alexcrichton
Centril Jul 26, 2019
8654523
Rollup merge of #62974 - RalfJung:crossbeam, r=alexcrichton
Centril Jul 26, 2019
d213e2f
Rollup merge of #62979 - Mark-Simulacrum:json-dumper-pretty, r=Xanewok
Centril Jul 26, 2019
70f0c91
Rollup merge of #63013 - nivkner:ffi-safe-slice, r=sfackler
Centril Jul 26, 2019
17396c9
Rollup merge of #63014 - davidtwco:rustfix-incorrect-dyn-suggestion, …
Centril Jul 26, 2019
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
25 changes: 20 additions & 5 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ name = "crossbeam-deque"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"crossbeam-epoch 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
]

Expand All @@ -610,15 +610,15 @@ dependencies = [

[[package]]
name = "crossbeam-epoch"
version = "0.7.0"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
Expand Down Expand Up @@ -1671,6 +1671,14 @@ name = "memoffset"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "memoffset"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "mime"
version = "0.3.13"
Expand Down Expand Up @@ -3312,6 +3320,11 @@ name = "scopeguard"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "scopeguard"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "security-framework"
version = "0.3.1"
Expand Down Expand Up @@ -4330,7 +4343,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3"
"checksum crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "05e44b8cf3e1a625844d1750e1f7820da46044ff6d28f4d43e455ba3e5bb2c13"
"checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150"
"checksum crossbeam-epoch 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f10a4f8f409aaac4b16a5474fb233624238fcdeefb9ba50d5ea059aab63ba31c"
"checksum crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9"
"checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b"
"checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9"
"checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c"
Expand Down Expand Up @@ -4440,6 +4453,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39"
"checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff"
"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3"
"checksum memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce6075db033bbbb7ee5a0bbd3a3186bbae616f57fb001c485c7ff77955f8177f"
"checksum mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "3e27ca21f40a310bd06d9031785f4801710d566c184a6e15bad4f1d9b65f9425"
"checksum mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30de2e4613efcba1ec63d8133f344076952090c122992a903359be5a4f99c3ed"
"checksum minifier 0.0.30 (registry+https://github.com/rust-lang/crates.io-index)" = "4c909e78edf61f3aa0dd2086da168cdf304329044bbf248768ca3d20253ec8c0"
Expand Down Expand Up @@ -4542,6 +4556,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2"
"checksum scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8"
"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27"
"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d"
"checksum security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eee63d0f4a9ec776eeb30e220f0bc1e092c3ad744b2a379e3993070364d3adc2"
"checksum security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9636f8989cbf61385ae4824b98c1aaa54c994d7d8b41f11c601ed799f0549a56"
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
Expand Down
4 changes: 0 additions & 4 deletions src/ci/docker/dist-powerpc-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,3 @@ ENV HOSTS=powerpc-unknown-linux-gnu

ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

# FIXME(#36150) this will fail the bootstrap. Probably means something bad is
# happening!
ENV NO_LLVM_ASSERTIONS 1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ matched against that pattern. For example:
fn is_symmetric(list: &[u32]) -> bool {
match list {
&[] | &[_] => true,
&[x, ref inside.., y] if x == y => is_symmetric(inside),
&[x, ref inside @ .., y] if x == y => is_symmetric(inside),
&[..] => false,
}
}
Expand Down
14 changes: 7 additions & 7 deletions src/libcore/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -657,13 +657,13 @@ macro_rules! uninit_array {
);
}

/// Built-in macros to the compiler itself.
/// Definitions of built-in macros.
///
/// These macros do not have any corresponding definition with a `macro_rules!`
/// macro, but are documented here. Their implementations can be found hardcoded
/// into libsyntax itself.
#[cfg(rustdoc)]
mod builtin {
/// Most of the macro properties (stability, visibility, etc.) are taken from the source code here,
/// with exception of expansion functions transforming macro inputs into outputs,
/// those functions are provided by the compiler.
#[cfg(not(bootstrap))]
pub(crate) mod builtin {

/// Causes compilation to fail with the given error message when encountered.
///
Expand Down Expand Up @@ -950,7 +950,7 @@ mod builtin {

/// Same as `column`, but less likely to be shadowed.
#[unstable(feature = "__rust_unstable_column", issue = "0",
reason = "internal implementation detail of the `column` macro")]
reason = "internal implementation detail of the `panic` macro")]
#[rustc_builtin_macro]
#[rustc_macro_transparency = "semitransparent"]
pub macro __rust_unstable_column() { /* compiler built-in */ }
Expand Down
47 changes: 47 additions & 0 deletions src/libcore/prelude/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,50 @@ pub use crate::option::Option::{self, Some, None};
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
pub use crate::result::Result::{self, Ok, Err};

// Re-exported built-in macros
#[cfg(not(bootstrap))]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow(deprecated)]
#[doc(no_inline)]
pub use crate::macros::builtin::{
Clone,
Copy,
Debug,
Decodable,
Default,
Encodable,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
RustcDecodable,
RustcEncodable,
__rust_unstable_column,
asm,
assert,
bench,
cfg,
column,
compile_error,
concat,
concat_idents,
env,
file,
format_args,
format_args_nl,
global_allocator,
global_asm,
include,
include_bytes,
include_str,
line,
log_syntax,
module_path,
option_env,
stringify,
test,
test_case,
trace_macros,
};
2 changes: 1 addition & 1 deletion src/libcore/task/wake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ impl fmt::Debug for Context<'_> {
/// This handle encapsulates a [`RawWaker`] instance, which defines the
/// executor-specific wakeup behavior.
///
/// Implements [`Clone`], [`Send`], and [`Sync`].
/// Implements [`Clone`], [`trait@Send`], and [`trait@Sync`].
///
/// [`RawWaker`]: struct.RawWaker.html
#[repr(transparent)]
Expand Down
6 changes: 0 additions & 6 deletions src/librustc/hir/def_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ newtype_index! {

#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum CrateNum {
/// Virtual crate for builtin macros
// FIXME(jseyfried): this is also used for custom derives until proc-macro crates get
// `CrateNum`s.
BuiltinMacros,
/// A special CrateNum that we use for the tcx.rcache when decoding from
/// the incr. comp. cache.
ReservedForIncrCompCache,
Expand All @@ -26,7 +22,6 @@ impl ::std::fmt::Debug for CrateNum {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match self {
CrateNum::Index(id) => write!(fmt, "crate{}", id.private),
CrateNum::BuiltinMacros => write!(fmt, "builtin macros crate"),
CrateNum::ReservedForIncrCompCache => write!(fmt, "crate for decoding incr comp cache"),
}
}
Expand Down Expand Up @@ -86,7 +81,6 @@ impl fmt::Display for CrateNum {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
CrateNum::Index(id) => fmt::Display::fmt(&id.private, f),
CrateNum::BuiltinMacros => write!(f, "builtin macros crate"),
CrateNum::ReservedForIncrCompCache => write!(f, "crate for decoding incr comp cache"),
}
}
Expand Down
Loading