8000 Rollup of 20 pull requests by pietroalbini · Pull Request #53832 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 20 pull requests #53832

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

Merged
merged 46 commits into from
Aug 31, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
931eb4c
Add one more example for Cow that shows how to keep Cow in a struct
kpp Aug 6, 2018
9a3a12e
Fix review notes
kpp Aug 15, 2018
34b65db
document effect of join on memory ordering
RalfJung Aug 15, 2018
5bfb785
Review fix
kpp Aug 15, 2018
b73843f
Force-inline `shallow_resolve` at its hottest call site.
nnethercote Aug 17, 2018
3995bff
Add another PartialEq example
GuillaumeGomez Aug 21, 2018
9395a02
Fix stabilisation version for macro_vis_matcher.
jkozlowski Aug 25, 2018
1f421d6
call span_suggestion with applicability
jcpst Aug 26, 2018
26f38c0
Do not suggest dereferencing in macro
estebank Aug 26, 2018
a2722f3
readd final newline
estebank Aug 27, 2018
4570ace
save-analysis: Differentiate foreign functions and statics.
emilio Aug 18, 2018
c874e36
add llvm-readobj to llvm-tools-preview
japaric Aug 27, 2018
8486efa
fix a typo: taget_env -> target_env
oconnor663 Aug 27, 2018
1d79d8b
Fix source automatic scroll
GuillaumeGomez Aug 27, 2018
04b4c40
Fix invalid display of unstable messages
GuillaumeGomez Aug 27, 2018
f77ad5c
remove `let x = baz` which was obscuring the real error
nikomatsakis Aug 6, 2018
e6dcdee
expand keep-stage --help text
RalfJung Aug 28, 2018
31b63d0
split paragraph
RalfJung Aug 28, 2018
1311339
Fix typo in comment
dmerejkowsky Aug 28, 2018
84796cb
sort
japaric Aug 28, 2018
93f3f5b
Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere i…
eddyb Aug 18, 2018
6628d39
move file-extension based .gitignore down to src/
RalfJung Aug 28, 2018
da4febd
Add partialeq implementation for TryFromIntError type
GuillaumeGomez Aug 18, 2018
890d04d
Fix a comment in src/libcore/slice/mod.rs
tbu- Aug 29, 2018
e477a13
Replace usages of 'bad_style' with 'nonstandard_style'.
frewsxcv Aug 29, 2018
e08a84a
Fix UI issues on Implementations on Foreign types
GuillaumeGomez Aug 29, 2018
b7e74a5
Rollup merge of #51760 - GuillaumeGomez:add-another-partialeq-example…
pietroalbini Aug 30, 2018
2531d43
Rollup merge of #53113 - kpp:more_docs_for_cow, r=GuillaumeGomez
pietroalbini Aug 30, 2018
8505270
Rollup merge of #53129 - nikomatsakis:issue-51172-tweak-test, r=pnkfelix
pietroalbini Aug 30, 2018
0c8b8e8
Rollup merge of #53389 - RalfJung:thread-join, r=sfackler
pietroalbini Aug 30, 2018
ba83270
Rollup merge of #53472 - eddyb:fx-pls, r=pnkfelix
pietroalbini Aug 30, 2018
a245d9b
Rollup merge of #53476 - GuillaumeGomez:try-from-int-error-partial-eq…
pietroalbini Aug 30, 2018
1c36e76
Rollup merge of #53513 - nnethercote:inline-shallow_resolve, r=varkor
pietroalbini Aug 30, 2018
1535075
Rollup merge of #53655 - jcpst:with_applicability, r=estebank
pietroalbini Aug 30, 2018
3ee7628
Rollup merge of #53702 - jkozlowski:correct_version_for_macro_vis_mat…
pietroalbini Aug 30, 2018
0334ce4
Rollup merge of #53727 - estebank:incorrect-deref-suggestion, r=nikom…
pietroalbini Aug 30, 2018
ed07680
Rollup merge of #53732 - emilio:foreign-fn, r=nrc
pietroalbini Aug 30, 2018
d52fea8
Rollup merge of #53740 - japaric:readobj, r=alexcrichton
pietroalbini Aug 30, 2018
eaca5f8
Rollup merge of #53743 - oconnor663:target_env, r=kennytm
pietroalbini Aug 30, 2018
2e2980b
Rollup merge of #53747 - GuillaumeGomez:rustdoc-fixes, r=QuietMisdreavus
pietroalbini Aug 30, 2018
ad9a001
Rollup merge of #53753 - RalfJung:keep-stage, r=nikomatsakis
pietroalbini Aug 30, 2018
11fab7d
Rollup merge of #53756 - dmerejkowsky:fix-comment, r=KodrAus
pietroalbini Aug 30, 2018
c9862e2
Rollup merge of #53768 - RalfJung:gitignore, r=nikomatsakis
pietroalbini Aug 30, 2018
07fcb01
Rollup merge of #53785 - tbu-:pr_comment, r=Mark-Simulacrum
pietroalbini Aug 30, 2018
78d5509
Rollup merge of #53786 - frewsxcv:frewsxcv-bad-style, r=Manishearth
pietroalbini Aug 30, 2018
6b1fffa
Rollup merge of #53806 - GuillaumeGomez:fix-ui-issues-foreign-type-im…
pietroalbini Aug 30, 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
2 changes: 1 addition & 1 deletion src/bootstrap/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
//! Note that this module has a #[cfg(windows)] above it as none of this logic
//! is required on Unix.

#![allow(bad_style, dead_code)]
#![allow(nonstandard_style, dead_code)]

use std::env;
use std::io;
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ pub fn symlink_dir(config: &Config, src: &Path, dest: &Path) -> io::Result<()> {
//
// Copied from std
#[cfg(windows)]
#[allow(bad_style)]
#[allow(nonstandard_style)]
fn symlink_dir_inner(target: &Path, junction: &Path) -> io::Result<()> {
use std::ptr;
use std::ffi::OsStr;
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc_system/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ mod platform {
}

#[cfg(windows)]
#[allow(bad_style)]
#[allow(nonstandard_style)]
mod platform {
use MIN_ALIGN;
use System;
Expand Down
2 changes: 1 addition & 1 deletion src/libpanic_unwind/seh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
//! [win64]: http://msdn.microsoft.com/en-us/library/1eyas8tf.aspx
//! [llvm]: http://llvm.org/docs/ExceptionHandling.html#background-on-windows-exceptions

#![allow(bad_style)]
#![allow(nonstandard_style)]
#![allow(private_no_mangle_fns)]

use alloc::boxed::Box;
Expand Down
2 changes: 1 addition & 1 deletion src/libpanic_unwind/seh64_gnu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//! Unwinding implementation of top of native Win64 SEH,
//! however the unwind handler data (aka LSDA) uses GCC-compatible encoding.

#![allow(bad_style)]
#![allow(nonstandard_style)]
#![allow(private_no_mangle_fns)]

use alloc::boxed::Box;
Expand Down
2 changes: 1 addition & 1 deletion src/libpanic_unwind/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(bad_style)]
#![allow(nonstandard_style)]
#![allow(dead_code)]
#![cfg(windows)]

Expand Down
4 changes: 2 additions & 2 deletions src/librustc/ty/query/plumbing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ macro_rules! define_queries_inner {
}
}

#[allow(bad_style)]
#[allow(nonstandard_style)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum Query<$tcx> {
$($(#[$attr])* $name($K)),*
Expand Down Expand Up @@ -775,7 +775,7 @@ macro_rules! define_queries_inner {
pub mod queries {
use std::marker::PhantomData;

$(#[allow(bad_style)]
$(#[allow(nonstandard_style)]
pub struct $name<$tcx> {
data: PhantomData<&$tcx ()>
})*
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/util/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub struct ProfQDumpParams {
pub dump_profq_msg_log:bool,
}

#[allow(bad_style)]
#[allow(nonstandard_style)]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct QueryMsg {
pub query: &'static str,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/util/profiling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ macro_rules! define_categories {
$($name),*
}

#[allow(bad_style)]
#[allow(nonstandard_style)]
struct Categories<T> {
$($name: T),*
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_data_structures/flock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ mod imp {
}

#[cfg(windows)]
#[allow(bad_style)]
#[allow(nonstandard_style)]
mod imp {
use std::io;
use std::mem;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_errors/lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
use std::any::Any;

#[cfg(windows)]
#[allow(bad_style)]
#[allow(nonstandard_style)]
pub fn acquire_global_lock(name: &str) -> Box<dyn Any> {
use std::ffi::CString;
use std::io;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ use syntax::errors::{Applicability, DiagnosticBuilder};
use rustc::hir::{self, GenericParamKind, PatKind};
use rustc::hir::intravisit::FnKind;

use bad_style::{MethodLateContext, method_context};
use nonstandard_style::{MethodLateContext, method_context};

// hardwired lints from librustc
pub use lint::builtin::*;
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_lint/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ use syntax::edition::Edition;
use lint::LintId;
use lint::FutureIncompatibleInfo;

mod bad_style;
mod nonstandard_style;
pub mod builtin;
mod types;
mod unused;

use bad_style::*;
use nonstandard_style::*;
use builtin::*;
use types::*;
use unused::*;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/librustc_platform_intrinsics/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(bad_style)]
#![allow(nonstandard_style)]

#![cfg_attr(not(stage0), feature(nll))]
#![cfg_attr(not(stage0), feature(infer_outlives_requirements))]
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/os/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//! OS-specific functionality.

#![stable(feature = "os", since = "1.0.0")]
#![allow(missing_docs, bad_style, missing_debug_implementations)]
#![allow(missing_docs, nonstandard_style, missing_debug_implementations)]

cfg_if! {
if #[cfg(dox)] {
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/redox/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(dead_code, missing_docs, bad_style)]
#![allow(dead_code, missing_docs, nonstandard_style)]

use io::{self, ErrorKind};

Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(missing_docs, bad_style)]
#![allow(missing_docs, nonstandard_style)]

use io::{self, ErrorKind};
use libc;
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/wasm/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ pub fn lookup_host(_: &str) -> io::Result<LookupHost> {
unsupported()
}

#[allow(bad_style)]
#[allow(nonstandard_style)]
pub mod netc {
pub const AF_INET: u8 = 0;
pub const AF_INET6: u8 = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/windows/c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

//! C definitions used by libnative that don't belong in liblibc

#![allow(bad_style)]
#![allow(nonstandard_style)]
#![cfg_attr(test, allow(dead_code))]
#![unstable(issue = "0", feature = "windows_c")]

Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(missing_docs, bad_style)]
#![allow(missing_docs, nonstandard_style)]

use ptr;
use ffi::{OsStr, OsString};
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/windows/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

//! Implementation of `std::os` functionality for Windows

#![allow(bad_style)]
#![allow(nonstandard_style)]

use os::windows::prelude::*;

Expand Down
2 changes: 1 addition & 1 deletion src/libtest/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ fn get_concurrency() -> usize {
};

#[cfg(windows)]
#[allow(bad_style)]
#[allow(nonstandard_style)]
fn num_cpus() -> usize {
#[repr(C)]
struct SYSTEM_INFO {
Expand Down
2 changes: 1 addition & 1 deletion src/libunwind/libunwind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(bad_style)]
#![allow(nonstandard_style)]

macro_rules! cfg_if {
( $( if #[cfg( $meta:meta )] { $($it1:item)* } else { $($it2:item)* } )* ) =>
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/simd-target-feature-mixup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ fn is_sigill(status: ExitStatus) -> bool {
}

#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
#[allow(bad_style)]
#[allow(nonstandard_style)]
mod test {
// An SSE type
#[repr(simd)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/rustdoc/intra-links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub static THIS_STATIC: usize = 5usize;

pub trait SoAmbiguous {}

#[allow(bad_style)]
#[allow(nonstandard_style)]
pub fn SoAmbiguous() {}


Expand Down
8 changes: 4 additions & 4 deletions src/test/ui/lint/lint-group-style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(bad_style)]
#![deny(nonstandard_style)]
#![allow(dead_code)]

fn CamelCase() {} //~ ERROR should have a snake

#[allow(bad_style)]
#[allow(nonstandard_style)]
mod test {
fn CamelCase() {}

#[forbid(bad_style)]
#[forbid(nonstandard_style)]
mod bad {
fn CamelCase() {} //~ ERROR should have a snake

static bad: isize = 1; //~ ERROR should have an upper
}

mod warn {
#![warn(bad_style)]
#![warn(nonstandard_style)]

fn CamelCase() {} //~ WARN should have a snake

Expand Down
30 changes: 15 additions & 15 deletions src/test/ui/lint/lint-group-style.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ LL | fn CamelCase() {} //~ ERROR should have a snake
note: lint level defined here
--> $DIR/lint-group-style.rs:11:9
|
LL | #![deny(bad_style)]
| ^^^^^^^^^
= note: #[deny(non_snake_case)] implied by #[deny(bad_style)]
LL | #![deny(nonstandard_style)]
| ^^^^^^^^^^^^^^^^^
= note: #[deny(non_snake_case)] implied by #[deny(nonstandard_style)]

error: function `CamelCase` should have a snake case name such as `camel_case`
--> $DIR/lint-group-style.rs:22:9
Expand All @@ -20,9 +20,9 @@ LL | fn CamelCase() {} //~ ERROR should have a snake
note: lint level defined here
--> $DIR/lint-group-style.rs:20:14
|
LL | #[forbid(bad_style)]
| ^^^^^^^^^
= note: #[forbid(non_snake_case)] implied by #[forbid(bad_style)]
LL | #[forbid(nonstandard_style)]
| ^^^^^^^^^^^^^^^^^
= note: #[forbid(non_snake_case)] implied by #[forbid(nonstandard_style)]

error: static variable `bad` should have an upper case name such as `BAD`
--> $DIR/lint-group-style.rs:24:9
Expand All @@ -33,9 +33,9 @@ LL | static bad: isize = 1; //~ ERROR should have an upper
note: lint level defined here
--> $DIR/lint-group-style.rs:20:14
|
LL | #[forbid(bad_style)]
| ^^^^^^^^^
= note: #[forbid(non_upper_case_globals)] implied by #[forbid(bad_style)]
LL | #[forbid(nonstandard_style)]
| ^^^^^^^^^^^^^^^^^
= note: #[forbid(non_upper_case_globals)] implied by #[forbid(nonstandard_style)]

warning: function `CamelCase` should have a snake case name such as `camel_case`
--> $DIR/lint-group-style.rs:30:9
Expand All @@ -46,9 +46,9 @@ LL | fn CamelCase() {} //~ WARN should have a snake
note: lint level defined here
--> $DIR/lint-group-style.rs:28:17
|
LL | #![warn(bad_style)]
| ^^^^^^^^^
= note: #[warn(non_snake_case)] implied by #[warn(bad_style)]
LL | #![warn(nonstandard_style)]
| ^^^^^^^^^^^^^^^^^
= note: #[warn(non_snake_case)] implied by #[warn(nonstandard_style)]

warning: type `snake_case` should have a camel case name such as `SnakeCase`
--> $DIR/lint-group-style.rs:32:9
Expand All @@ -59,9 +59,9 @@ LL | struct snake_case; //~ WARN should have a camel
note: lint level defined here
--> $DIR/lint-group-style.rs:28:17
|
LL | #![warn(bad_style)]
| ^^^^^^^^^
= note: #[warn(non_camel_case_types)] implied by #[warn(bad_style)]
LL | #![warn(nonstandard_style)]
| ^^^^^^^^^^^^^^^^^
= note: #[warn(non_camel_case_types)] implied by #[warn(nonstandard_style)]

error: aborting due to 3 previous errors

2 changes: 1 addition & 1 deletion src/test/ui/lint/lint-shorthand-field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(bad_style, unused_variables)]
#![allow(nonstandard_style, unused_variables)]
#![deny(non_shorthand_field_patterns)]

struct Foo {
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/lint/outer-forbid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// Forbidding a group (here, `unused`) overrules subsequent allowance of both
// the group, and an individual lint in the group (here, `unused_variables`);
// and, forbidding an individual lint (here, `non_snake_case`) overrules
// subsequent allowance of a lint group containing it (here, `bad_style`). See
// subsequent allowance of a lint group containing it (here, `nonstandard_style`). See
// Issue #42873.

#![forbid(unused, non_snake_case)]
Expand All @@ -22,7 +22,7 @@ fn foo() {}
#[allow(unused)] //~ ERROR overruled
fn bar() {}

#[allow(bad_style)] //~ ERROR overruled
#[allow(nonstandard_style)] //~ ERROR overruled
fn main() {
println!("hello forbidden world")
}
6 changes: 3 additions & 3 deletions src/test/ui/lint/outer-forbid.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ LL | #![forbid(unused, non_snake_case)]
LL | #[allow(unused)] //~ ERROR overruled
| ^^^^^^ overruled by previous forbid

error[E0453]: allow(bad_style) overruled by outer forbid(non_snake_case)
error[E0453]: allow(nonstandard_style) overruled by outer forbid(non_snake_case)
--> $DIR/outer-forbid.rs:25:9
|
LL | #![forbid(unused, non_snake_case)]
| -------------- `forbid` level set here
...
LL | #[allow(bad_style)] //~ ERROR overruled
| ^^^^^^^^^ overruled by previous forbid
LL | #[allow(nonstandard_style)] //~ ERROR overruled
| ^^^^^^^^^^^^^^^^^ overruled by previous forbid

error: aborting due to 3 previous errors

Expand Down
0