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 9 pull requests #63112

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
fed12fa
Remove mentions of removed `offset_to` method
phil-opp Jun 19, 2019
c9c73f5
Refer to `add` method instead of `offset`
phil-opp Jul 17, 2019
d68f0f6
Remove derives `Encodable`/`Decodable` and unstabilize attribute `#[b…
petrochenkov Jul 27, 2019
dfad725
Recover 'for ( $pat in $expr ) $block'.
Centril Jul 24, 2019
1b11860
Use chaining for diagnosics in parser.
Centril Jul 24, 2019
56b39fb
Add 'span_to_snippet' shortcut.
Centril Jul 24, 2019
18bf9dd
Properly check the defining scope of existential types
Aaron1011 Jul 28, 2019
8811b9c
Fix formatting
Aaron1011 Jul 28, 2019
3e98c3a
Rename test and add comment
Aaron1011 Jul 28, 2019
0cdd693
vxworks: Remove Linux-specific comments.
josephlr Jul 29, 2019
c56d8a8
Add links to None in Option doc
tesuji Jul 29, 2019
624c5da
impl Debug for Chars
max-sixty Jul 26, 2019
3325ff6
comments from @lzutao
max-sixty Jul 29, 2019
8d7fb87
std: Fix a failing `fs` test on Windows
alexcrichton Jul 29, 2019
870efe3
Add very simple edition check to tidy; and add missing edition = 2018s.
crlf0710 Jul 28, 2019
b20abcf
Rollup merge of #61965 - phil-opp:patch-4, r=scottmcm
Centril Jul 29, 2019
600c8f6
Rollup merge of #62507 - petrochenkov:macunstab, r=alexcrichton
Centril Jul 29, 2019
04ec35b
Rollup merge of #62928 - Centril:recover-parens-around-for-head, r=es…
Centril Jul 29, 2019
2575e53
Rollup merge of #63000 - max-sixty:chars-display, r=alexcrichton
Centril Jul 29, 2019
2c0e220
Rollup merge of #63087 - crlf0710:tidy_2018, r=Mark-Simulacrum
Centril Jul 29, 2019
4551dc2
Rollup merge of #63093 - Aaron1011:fix/existential-closure, r=cramertj
Centril Jul 29, 2019
0a0cf6f
Rollup merge of #63099 - josephlr:vxworks, r=alexcrichton
Centril Jul 29, 2019
9845163
Rollup merge of #63108 - lzutao:option-xor-typo, r=jonas-schievink
Centril Jul 29, 2019
2c54921
Rollup merge of #63109 - alexcrichton:disable-windows-fs-test, r=sfac…
Centril Jul 29, 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
2 changes: 1 addition & 1 deletion src/libcore/hint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pub fn spin_loop() {
///
/// This function is a no-op, and does not even read from `dummy`.
#[inline]
#[unstable(feature = "test", issue = "27812")]
#[unstable(feature = "test", issue = "50297")]
#[allow(unreachable_code)] // this makes #[cfg] a bit easier below.
pub fn black_box<T>(dummy: T) -> T {
// We need to "use" the argument in some way LLVM can't introspect, and on
Expand Down
27 changes: 2 additions & 25 deletions src/libcore/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,8 @@ pub(crate) mod builtin {
pub macro test($item:item) { /* compiler built-in */ }

/// Attribute macro applied to a function to turn it into a benchmark test.
#[stable(feature = "rust1", since = "1.0.0")]
#[unstable(feature = "test", issue = "50297",
reason = "`bench` is a part of custom test frameworks which are unstable")]
#[allow_internal_unstable(test, rustc_attrs)]
#[rustc_builtin_macro]
#[rustc_macro_transparency = "semitransparent"]
Expand Down Expand Up @@ -1309,37 +1310,13 @@ pub(crate) mod builtin {
#[allow_internal_unstable(core_intrinsics)]
pub macro Debug($item:item) { /* compiler built-in */ }

/// Unstable implementation detail of the `rustc` compiler, do not use.
#[rustc_builtin_macro]
#[rustc_macro_transparency = "semitransparent"]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_deprecated(
since = "1.0.0",
reason = "derive(Decodable) is deprecated in favor of derive(RustcDecodable)",
suggestion = "RustcDecodable",
)]
#[allow_internal_unstable(core_intrinsics, libstd_sys_internals)]
pub macro Decodable($item:item) { /* compiler built-in */ }

/// Derive macro generating an impl of the trait `Default`.
#[rustc_builtin_macro]
#[rustc_macro_transparency = "semitransparent"]
#[stable(feature = "rust1", since = "1.0.0")]
#[allow_internal_unstable(core_intrinsics)]
pub macro Default($item:item) { /* compiler built-in */ }

/// Unstable implementation detail of the `rustc` compiler, do not use.
#[rustc_builtin_macro]
#[rustc_macro_transparency = "semitransparent"]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_deprecated(
since = "1.0.0",
reason = "derive(Encodable) is deprecated in favor of derive(RustcEncodable)",
suggestion = "RustcEncodable",
)]
#[allow_internal_unstable(core_intrinsics)]
pub macro Encodable($item:item) { /* compiler built-in */ }

/// Derive macro generating an impl of the trait `Eq`.
#[rustc_builtin_macro]
#[rustc_macro_transparency = "semitransparent"]
Expand Down
2 changes: 0 additions & 2 deletions src/libcore/prelude/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ pub use crate::macros::builtin::{
Clone,
Copy,
Debug,
Decodable,
Default,
Encodable,
Eq,
Hash,
Ord,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_data_structures/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#![feature(stmt_expr_attributes)]
#![feature(core_intrinsics)]
#![feature(integer_atomics)]
#![feature(test)]

#![cfg_attr(unix, feature(libc))]
#![cfg_attr(test, feature(test))]

#![cfg_attr(not(bootstrap), allow(rustc::default_hash_types))]

Expand Down
3 changes: 2 additions & 1 deletion src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
// std may use features in a platform-specific way
#![allow(unused_features)]

#![cfg_attr(test, feature(print_internals, set_stdio, test, update_panic_count))]
#![cfg_attr(test, feature(print_internals, set_stdio, update_panic_count))]
#![cfg_attr(all(target_vendor = "fortanix", target_env = "sgx"),
feature(slice_index_methods, decl_macro, coerce_unsized,
sgx_platform, ptr_wrapping_offset_from))]
Expand Down Expand Up @@ -304,6 +304,7 @@
#![feature(stdsimd)]
#![feature(stmt_expr_attributes)]
#![feature(str_internals)]
#![feature(test)]
#![feature(thread_local)]
#![feature(todo_macro)]
#![feature(toowned_clone_into)]
Expand Down
2 changes: 0 additions & 2 deletions src/libstd/prelude/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ pub use core::prelude::v1::{
Clone,
Copy,
Debug,
Decodable,
Default,
Encodable,
Eq,
Hash,
Ord,
Expand Down
18 changes: 1 addition & 17 deletions src/libsyntax_ext/deriving/decodable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,7 @@ pub fn expand_deriving_rustc_decodable(cx: &mut ExtCtxt<'_>,
mitem: &MetaItem,
item: &Annotatable,
push: &mut dyn FnMut(Annotatable)) {
expand_deriving_decodable_imp(cx, span, mitem, item, push, "rustc_serialize")
}

pub fn expand_deriving_decodable(cx: &mut ExtCtxt<'_>,
span: Span,
mitem: &MetaItem,
item: &Annotatable,
push: &mut dyn FnMut(Annotatable)) {
expand_deriving_decodable_imp(cx, span, mitem, item, push, "serialize")
}

fn expand_deriving_decodable_imp(cx: &mut ExtCtxt<'_>,
span: Span,
mitem: &MetaItem,
item: &Annotatable,
push: &mut dyn FnMut(Annotatable),
krate: &'static str) {
let krate = "rustc_serialize";
let typaram = &*deriving::hygienic_type_parameter(item, "__D");

let trait_def = TraitDef {
Expand Down
18 changes: 1 addition & 17 deletions src/libsyntax_ext/deriving/encodable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,23 +98,7 @@ pub fn expand_deriving_rustc_encodable(cx: &mut ExtCtxt<'_>,
mitem: &MetaItem,
item: &Annotatable,
push: &mut dyn FnMut(Annotatable)) {
expand_deriving_encodable_imp(cx, span, mitem, item, push, "rustc_serialize")
}

pub fn expand_deriving_encodable(cx: &mut ExtCtxt<'_>,
span: Span,
mitem: &MetaItem,
item: &Annotatable,
push: &mut dyn FnMut(Annotatable)) {
expand_deriving_encodable_imp(cx, span, mitem, item, push, "serialize")
}

fn expand_deriving_encodable_imp(cx: &mut ExtCtxt<'_>,
span: Span,
mitem: &MetaItem,
item: &Annotatable,
push: &mut dyn FnMut(Annotatable),
krate: &'static str) {
let krate = "rustc_serialize";
let typaram = &*deriving::hygienic_type_parameter(item, "__S");

let trait_def = TraitDef {
Expand Down
2 changes: 0 additions & 2 deletions src/libsyntax_ext/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ pub fn register_builtin_macros(resolver: &mut dyn syntax::ext::base::Resolver, e
Clone: clone::expand_deriving_clone,
Copy: bounds::expand_deriving_copy,
Debug: debug::expand_deriving_debug,
Decodable: decodable::expand_deriving_decodable,
Default: default::expand_deriving_default,
Encodable: encodable::expand_deriving_encodable,
Eq: eq::expand_deriving_eq,
Hash: hash::expand_deriving_hash,
Ord: ord::expand_deriving_ord,
Expand Down
2 changes: 1 addition & 1 deletion src/libtest/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// cargo) to detect this crate.

#![crate_name = "test"]
#![unstable(feature = "test", issue = "27812")]
#![unstable(feature = "test", issue = "50297")]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))]
#![feature(asm)]
#![cfg_attr(any(unix, target_os = "cloudabi"), feature(libc, rustc_private))]
Expand Down
14 changes: 7 additions & 7 deletions src/test/run-make-fulldeps/pretty-expanded/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

// #13544

extern crate serialize;
extern crate serialize as rustc_serialize;

#[derive(Encodable)] pub struct A;
#[derive(Encodable)] pub struct B(isize);
#[derive(Encodable)] pub struct C { x: isize }
#[derive(Encodable)] pub enum D {}
#[derive(Encodable)] pub enum E { y }
#[derive(Encodable)] pub enum F { z(isize) }
#[derive(RustcEncodable)] pub struct A;
#[derive(RustcEncodable)] pub struct B(isize);
#[derive(RustcEncodable)] pub struct C { x: isize }
#[derive(RustcEncodable)] pub enum D {}
#[derive(RustcEncodable)] pub enum E { y }
#[derive(RustcEncodable)] pub enum F { z(isize) }
5 changes: 3 additions & 2 deletions src/test/run-make-fulldeps/save-analysis/foo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,9 @@ impl Error + 'static + Send {
<Error + 'static>::is::<T>(self)
}
}
extern crate serialize;
#[derive(Clone, Copy, Hash, Encodable, Decodable, PartialEq, Eq, PartialOrd, Ord, Debug, Default)]
extern crate serialize as rustc_serialize;
#[derive(Clone, Copy, Hash, RustcEncodable, RustcDecodable,
PartialEq, Eq, PartialOrd, Ord, Debug, Default)]
struct AllDerives(i32);

fn test_format_args() {
Expand Down
12 changes: 0 additions & 12 deletions src/test/ui-fulldeps/deprecated-derive.rs

This file was deleted.

8 changes: 0 additions & 8 deletions src/test/ui-fulldeps/deprecated-derive.stderr

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

// check-pass

#![feature(test)]
#![warn(unused_attributes, unknown_lints)]

// UNGATED WHITE-LISTED BUILT-IN ATTRIBUTES
Expand Down
Loading