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 11 pull requests #58831

Closed
wants to merge 39 commits into from
Closed
Changes from 2 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
1fd2f16
Have all methods of Filter and FilterMap use internal iteration
timvermeulen Feb 25, 2019
d89c2f6
Use informational target machine for metadata
nagisa Feb 20, 2019
8884771
Add relevant benchmarks
timvermeulen Feb 27, 2019
ec2e4ba
Improve existing benchmarks to prevent extreme optimizations
timvermeulen Feb 27, 2019
88bd624
Add trailing newline
timvermeulen Feb 27, 2019
932fe17
rust-lldb: fix crash when printing empty string
euclio Feb 22, 2019
4e7d4c7
ManuallyDrop != MaybeUninit
RalfJung Feb 27, 2019
b70a953
Replace `s` with `self` in docs for str methods taking self.
tspiteri Feb 20, 2019
f92c204
improve readability
RalfJung Feb 27, 2019
a046c38
Make migrate mode work at item level granularity
matthewjasper Feb 27, 2019
a998b1f
allow specifying attributes for tool lints
euclio Feb 27, 2019
fc4b916
Add a test for #10876
varkor Feb 25, 2019
e206d4e
Add tests for #26448
varkor Feb 25, 2019
93ff7dc
Add a test for #26619
varkor Feb 25, 2019
987d71f
Add a test for #44127
varkor Feb 25, 2019
bdd3826
Add a test for #44255
varkor Feb 25, 2019
36b1326
Add a test for #46101
varkor Feb 25, 2019
1068424
Add a test for #55731
varkor Feb 25, 2019
525dc46
Add a test for #57781
varkor Feb 25, 2019
5fb2d8b
Add a test for #22892
varkor Feb 25, 2019
0976e5e
Add a test for #28587
varkor Feb 25, 2019
42a89c6
Add a test for #26577
varkor Feb 25, 2019
0df193f
Add a test for #27054
varkor Feb 25, 2019
70b853d
Update test for issue #55731
varkor Feb 26, 2019
797d8ea
Make `Unique::as_ptr`, `NonNull::dangling` and `NonNull::cast` const
Feb 28, 2019
0c1a38c
Update src/libcore/mem.rs
Centril Feb 28, 2019
96be181
Fixed a syntax error in the pin docs
Feb 28, 2019
3391f6c
tidy: deny(rust_2018_idioms)
Centril Mar 1, 2019
059121b
Rollup merge of #58605 - nagisa:fix-the-metadata, r=michaelwoerister
pietroalbini Mar 1, 2019
cb09ce2
Rollup merge of #58629 - euclio:debug-empty-str, r=alexcrichton
pietroalbini Mar 1, 2019
11e7256
Rollup merge of #58730 - timvermeulen:internal_iteration, r=scottmcm
pietroalbini Mar 1, 2019
fcf734c
Rollup merge of #58743 - varkor:bulk-needstest-1, r=alexcrichton
pietroalbini Mar 1, 2019
faeba62
Rollup merge of #58750 - TimDiekmann:master, r=oli-obk
pietroalbini Mar 1, 2019
20409cc
Rollup merge of #58780 - RalfJung:manually-drop, r=nagisa
pietroalbini Mar 1, 2019
15c1c1f
Rollup merge of #58782 - tspiteri:str-escape-self, r=kennytm
pietroalbini Mar 1, 2019
9bbd413
Rollup merge of #58785 - euclio:tool-lint-attrs, r=estebank
pietroalbini Mar 1, 2019
ba87c3d
Rollup merge of #58788 - matthewjasper:compare-children, r=pnkfelix
pietroalbini Mar 1, 2019
583bea5
Rollup merge of #58821 - alex:patch-1, r=Centril
pietroalbini Mar 1, 2019
5de3f96
Rollup merge of #58830 - Centril:rust_2018_idioms-tidy, r=oli-obk
pietroalbini Mar 1, 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
12 changes: 6 additions & 6 deletions src/tools/tidy/src/deps.rs
Original file line number Diff line number Diff line change
@@ -49,13 +49,13 @@ const EXCEPTIONS: &[&str] = &[
];

/// Which crates to check against the whitelist?
const WHITELIST_CRATES: &[CrateVersion] = &[
const WHITELIST_CRATES: &[CrateVersion<'_>] = &[
CrateVersion("rustc", "0.0.0"),
CrateVersion("rustc_codegen_llvm", "0.0.0"),
];

/// Whitelist of crates rustc is allowed to depend on. Avoid adding to the list if possible.
const WHITELIST: &[Crate] = &[
const WHITELIST: &[Crate<'_>] = &[
Crate("adler32"),
Crate("aho-corasick"),
Crate("arrayvec"),
@@ -183,7 +183,7 @@ struct Crate<'a>(&'a str); // (name)
#[derive(Copy, Clone, PartialOrd, Ord, PartialEq, Eq, Debug, Hash)]
struct CrateVersion<'a>(&'a str, &'a str); // (name, version)

impl<'a> Crate<'a> {
impl Crate<'_> {
pub fn id_str(&self) -> String {
format!("{} ", self.0)
}
@@ -330,10 +330,10 @@ fn get_deps(path: &Path, cargo: &Path) -> Resolve {

/// Checks the dependencies of the given crate from the given cargo metadata to see if they are on
/// the whitelist. Returns a list of illegal dependencies.
fn check_crate_whitelist<'a, 'b>(
whitelist: &'a HashSet<Crate>,
fn check_crate_whitelist<'a>(
whitelist: &'a HashSet<Crate<'_>>,
resolve: &'a Resolve,
visited: &'b mut BTreeSet<CrateVersion<'a>>,
visited: &mut BTreeSet<CrateVersion<'a>>,
krate: CrateVersion<'a>,
must_be_on_whitelist: bool,
) -> BTreeSet<Crate<'a>> {
2 changes: 1 addition & 1 deletion src/tools/tidy/src/features.rs
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ pub enum Status {
}

impl fmt::Display for Status {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let as_str = match *self {
Status::Stable => "stable",
Status::Unstable => "unstable",
3 changes: 2 additions & 1 deletion src/tools/tidy/src/lib.rs
Original file line number Diff line number Diff line change
@@ -3,7 +3,8 @@
//! This library contains the tidy lints and exposes it
//! to be used by tools.

extern crate serde;
#![deny(rust_2018_idioms)]

extern crate serde_json;
#[macro_use]
extern crate serde_derive;