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

Rust tidy check for Cargo.lock #33209

Closed
wants to merge 127 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
0ea66f3
Avoid gated feature checking unconfigured items
jseyfried Apr 8, 2016
417a6df
Add regression test
jseyfried Apr 8, 2016
5eb775e
Remove redundant gated feature checking pass
jseyfried Apr 9, 2016
86f069d
Remove redundant call to `expand_item_multi_modifier`
jseyfried Apr 9, 2016
9e167ef
Add Entry::key
sfackler Apr 22, 2016
c46164b
Refactor away field `vis` of `ModuleS`
jseyfried Apr 26, 2016
c9d8e14
Refactor field `span` of `NameBinding` from `Option<Span>` to `Span`.
jseyfried Apr 27, 2016
2ccaeed
Refactor away `FallbackChecks` and remove dead code
jseyfried Apr 26, 2016
82e0dd5
Refactor away `is_static_method`
jseyfried Apr 26, 2016
6da1153
Refactor away `get_trait_name`
jseyfried Apr 25, 2016
3bcf818
Refactor `resolve_crate_relative_path` and `resolve_module_relative_p…
jseyfried Apr 27, 2016
33bb269
Refactor away a use of `ast_map.span_if_local()`
jseyfried Apr 27, 2016
6aa9145
Avoid using the hir map when visibility checking in `resolve`
jseyfried Apr 27, 2016
ac26419
Address style nits
jseyfried Apr 27, 2016
0cfb5a0
Add detailed error message for E0434 #32777
Apr 26, 2016
b1337d3
Add opt-level options for optimizing for size and minimum size. This …
brandonedens Mar 27, 2016
8a8493a
Add opt-level=s and opt-level=z tests to the existing tests that conf…
brandonedens Mar 28, 2016
49d2825
Place optimize for size and minsize rustc invocation options behind a…
brandonedens Apr 29, 2016
3c1d087
Make Btreeset::Insert docs more consistent
bwinterton Apr 29, 2016
8b1dcf4
Auto merge of #33232 - jseyfried:resolve_ast_groundwork, r=nrc
bors Apr 29, 2016
c738d75
add Cargo.lock check to ensure it is synced
Apr 25, 2016
60c8f7d
Revert #27493
jseyfried Apr 23, 2016
5a4e0b1
Remove use of `ast_map.span_if_local()` and improve diagnostics
jseyfried Apr 25, 2016
a70e42a
Remove use of `ast_map.expect_item()` and improve diagnostics (fixes …
jseyfried Apr 24, 2016
6bc9318
configure: Add a sanity check for tarballs without submodules
brson Apr 29, 2016
9b63263
Auto merge of #33229 - timothy-mcroy:master, r=guillaumegomez
bors Apr 29, 2016
5f95610
Fix patterns of the constants that are const meth
nagisa Apr 30, 2016
04f8ba2
Impl int/uint::MIN/MAX in terms of min/max_value
nagisa Apr 30, 2016
46504e9
Auto merge of #33148 - sfackler:entry-key, r=alexcrichton
bors Apr 30, 2016
16eaecb
Emit warning to user when attempting to use optimize for size on non-…
brandonedens Apr 30, 2016
b0aefff
Auto merge of #32846 - jseyfried:allow_unconfigured_gated_expanded_it…
bors Apr 30, 2016
e6201cf
Implement find() on Chain iterators
birkenfeld Apr 30, 2016
9e17622
Auto merge of #33279 - brson:insert-diatribe-against-github-here, r=a…
bors Apr 30, 2016
2a815a2
Auto merge of #33276 - bwinterton:btreeset-insert-doc-fix, r=Guillaum…
bors Apr 30, 2016
08207c9
Note that later versions of G++ are okay
DemiMarie Apr 30, 2016
0649942
Panic on relowering an AST node with a cached node id
jseyfried Apr 30, 2016
3906aef
Handle coercion casts properly when building the MIR
Aatch May 1, 2016
3eef083
libsyntax/pp: minor modernizations
birkenfeld May 1, 2016
4186169
libsyntax/pp: replace manual ring buffer with a VecDeque
birkenfeld May 1, 2016
e8cbcef
Fix alloc_jemalloc on windows gnu targets
ollie27 May 1, 2016
a4128e5
Fix a race condition caused by concurrently executed codegen unit tests.
michaelwoerister May 1, 2016
b51698a
match check: note "catchall" patterns in unreachable error
birkenfeld May 1, 2016
a4b0481
Auto merge of #33317 - michaelwoerister:fix-partitioning-tests-race, …
bors May 1, 2016
ffba7b7
typeck: remove confusing suggestion for calling a fn type
birkenfeld May 1, 2016
adda14a
Auto merge of #33298 - drbo:patch-1, r=alexcrichton
bors May 1, 2016
02df9f3
Remove idempotent lowering test
jseyfried Apr 30, 2016
ca88c44
Avoid using the lowering context in `librustc_save_analysis`
jseyfried Apr 30, 2016
b8dc2a7
Remove the lowering context's id caching system
jseyfried Apr 30, 2016
298a1c0
Cleanup formatting
jseyfried May 2, 2016
522b6ed
Avoid keeping MTWT tables for save-analysis
jseyfried May 1, 2016
ef69ef8
Remove outdated comment
jseyfried May 2, 2016
855fb61
Auto merge of #33296 - jseyfried:non_idempotent_lowering, r=nrc
bors May 2, 2016
700d3e2
Auto merge of #33190 - jseyfried:improve_diagnostics, r=nrc
bors May 2, 2016
0e89f55
E0269: add suggestion to check for trailing semicolons
birkenfeld May 1, 2016
d20b406
diagnostics for E0432: imports are relative to crate root
birkenfeld May 1, 2016
9e23000
lexer: do not display char confusingly in error message
birkenfeld May 2, 2016
38c8836
docs: Changed docs for `size_of` to describe size as a stride offset
cramertj May 2, 2016
d3c2c71
Auto merge of #33284 - nagisa:mir-fix-constfn-pats, r=alexcrichton
bors May 2, 2016
e1a575c
Auto merge of #33289 - birkenfeld:chain-find, r=bluss
bors May 2, 2016
0eb575c
Auto merge of #33303 - Aatch:mir-coercion-cast, r=arielb1
bors May 2, 2016
9fe3c06
libstd: correct the link to functions in io module documentation
Ryman May 2, 2016
a20ee76
revamp MultiSpan and introduce new snippet code
nikomatsakis Apr 20, 2016
e7c7a18
adapt JSON to new model
nikomatsakis Apr 20, 2016
5b150cf
add borrowck info inline in main snippet
nikomatsakis Apr 20, 2016
11dc974
refactor to use new snippet code and model
nikomatsakis Apr 20, 2016
d9a947c
use new `note_expected_found` API
nikomatsakis Apr 20, 2016
e416518
update test cases to reflect new messages
nikomatsakis Apr 20, 2016
1ff1887
thread tighter span for closures around
nikomatsakis Apr 20, 2016
489a6c9
replace fileline_{help,note} with {help,note}
nikomatsakis Apr 20, 2016
41a652e
WIP factor out RudimentaryEmitter
nikomatsakis Apr 20, 2016
71c6f81
change errors from Yellow to Magenta
nikomatsakis Apr 20, 2016
4714394
delete the json-errors test
nikomatsakis Apr 20, 2016
9d022f2
rewrite span-length to include strings
nikomatsakis Apr 20, 2016
1067850
refactor the Emitter trait
nikomatsakis Apr 21, 2016
8013eeb
fix error message in librustc_driver tests
nikomatsakis Apr 21, 2016
5adfe5b
Nit: comments should be uppercase letter
nikomatsakis Apr 26, 2016
9a9c9af
Fix whitespace
nikomatsakis Apr 26, 2016
e56121c
Do not import variants from RenderedLineKind
nikomatsakis Apr 26, 2016
d58a4be
Nit: do not import variants from Style
nikomatsakis Apr 26, 2016
d5529f0
Nit: do not use RLK
nikomatsakis Apr 26, 2016
f6496cd
Nit: address various style nits
nikomatsakis Apr 26, 2016
94841be
Nit: in emitter.rs
nikomatsakis Apr 26, 2016
24f4b15
Nit: use last_mut better
nikomatsakis Apr 26, 2016
1fdbfcd
only emit `^` at the start of a multi-line error
nikomatsakis Apr 26, 2016
883b969
Nit: add comment
nikomatsakis Apr 27, 2016
5db4d62
Nit: remove push_primary_span, which was never called
nikomatsakis Apr 27, 2016
ba12ed0
fix tests better
nikomatsakis Apr 27, 2016
8a9ad72
Nit: use Range::contains
nikomatsakis Apr 27, 2016
790043b
fix snippet tests MORE!
nikomatsakis Apr 27, 2016
89d086b
change color of warning to YELLOW
nikomatsakis Apr 27, 2016
49dfac4
move "lint level defined here" into secondary note
nikomatsakis Apr 27, 2016
84cb56f
Add back in a 'old school' error format
Apr 28, 2016
79f61a4
Finish up with 'old school' error mode
Apr 29, 2016
5974e5b
Fix up error-pattern style test
Apr 29, 2016
2ba5fac
fix rebase flaws
nikomatsakis Apr 29, 2016
95576b8
update unit tests
nikomatsakis Apr 30, 2016
64e0819
patch travis failure
nikomatsakis Apr 30, 2016
f359aa2
Fix unicode test to use original error format
sophiajt Apr 30, 2016
9d151a7
do not fail if len(rendered_lines) is == 1
nikomatsakis May 2, 2016
db8a9a9
avoid double panic
nikomatsakis May 2, 2016
d80497e
Auto merge of #33308 - ollie27:wingnu_jemalloc, r=alexcrichton
bors May 2, 2016
71e6329
rustc: Handle concurrent `create_dir` requests
alexcrichton May 2, 2016
9355a91
assert we get at least two rendered lines back
nikomatsakis May 2, 2016
9a003b0
Auto merge of #32386 - brandonedens:llvm_min_size, r=alexcrichton
bors May 2, 2016
a4000cb
Make pretty printer take Session by ref
nrc Apr 19, 2016
7ee02d9
Use the compiler API to run pretty printing.
nrc Apr 20, 2016
52a2b33
Refactor pretty printing to use more of the driver
nrc Apr 20, 2016
aaf56d7
Fix tests
nrc Apr 21, 2016
c1c6e99
rebasing
nrc Apr 26, 2016
44b3cd8
Auto merge of #32756 - nikomatsakis:borrowck-snippet, r=nrc
bors May 3, 2016
40199f6
Rollup merge of #32756 - nikomatsakis:borrowck-snippet, r=nrc
Manishearth May 2, 2016
308f10c
Rollup merge of #33309 - birkenfeld:pp, r=nrc
Manishearth May 2, 2016
1d6cc19
Rollup merge of #33320 - birkenfeld:issue31573, r=arielb1
Manishearth May 2, 2016
c4d950d
Rollup merge of #33323 - birkenfeld:issue-31221, r=Manishearth
Manishearth May 2, 2016
68c29e0
Rollup merge of #33324 - birkenfeld:issue-30497, r=GuillaumeGomez
Manishearth May 2, 2016
0ee84c7
Rollup merge of #33325 - birkenfeld:issue-31341, r=jseyfried
Manishearth May 2, 2016
7e88dc7
Rollup merge of #33332 - alexcrichton:handle-more-races, r=michaelwoe…
Manishearth May 2, 2016
ac19fdc
Rollup merge of #33334 - birkenfeld:issue29088, r=Manishearth
Manishearth May 2, 2016
d6c6bbf
Rollup merge of #33335 - cramertj:master, r=alexcrichton
Manishearth May 2, 2016
638cf9f
Rollup merge of #33346 - Ryman:patch-4, r=alexcrichton
Manishearth May 2, 2016
43c5fef
Auto merge of #33354 - Manishearth:rollup, r=Manishearth
bors May 3, 2016
780f725
typeck: when suggesting associated fns, do not show call site as fall…
birkenfeld May 2, 2016
7d8100a
Auto merge of #33119 - nrc:pretty, r=pnkfelix
bors May 3, 2016
3157691
Auto merge of #33330 - birkenfeld:issue-29121, r=Manishearth
bors May 3, 2016
daf367c
add Cargo.lock check to ensure it is synced
Apr 25, 2016
1afb8b1
update the Cargo lock file
gsquire May 4, 2016
b9c60d1
Merge branch 'cargo-lock-check' of github.com:gsquire/rust into cargo…
gsquire May 4, 2016
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Read ["Installing Rust"] from [The Book].

1. Make sure you have installed the dependencies:

* `g++` 4.7 or `clang++` 3.x
* `g++` 4.7 or later or `clang++` 3.x
* `python` 2.7 (but not 3.x)
* GNU `make` 3.81 or later
* `curl`
Expand Down
13 changes: 13 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1453,6 +1453,19 @@ then
cd ${CFG_BUILD_DIR}
fi

# Do a sanity check that the submodule source exists. Because GitHub
# automatically publishes broken tarballs that can't be disabled, and
# people download them and try to use them.
if [ ! -e "${CFG_SRC_DIR}/src/liblibc" ]; then
err "some submodules are missing. Is this a broken tarball?

If you downloaded this tarball from the GitHub release pages at
https://github.com/rust-lang/rust/releases,
then please delete it and instead download the source from
https://www.rust-lang.org/downloads.html"

fi

# Configure llvm, only if necessary
step_msg "looking at LLVM"
CFG_LLVM_SRC_DIR=${CFG_SRC_DIR}src/llvm/
Expand Down
16 changes: 8 additions & 8 deletions src/liballoc_jemalloc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,28 +41,28 @@ use libc::{c_int, c_void, size_t};
#[cfg(not(cargobuild))]
extern {}

// Note that the symbols here are prefixed by default on OSX (we don't
// explicitly request it), and on Android and DragonFly we explicitly request
// it as unprefixing cause segfaults (mismatches in allocators).
// Note that the symbols here are prefixed by default on OSX and Windows (we
// don't explicitly request it), and on Android and DragonFly we explicitly
// request it as unprefixing cause segfaults (mismatches in allocators).
extern {
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios",
target_os = "dragonfly"),
target_os = "dragonfly", target_os = "windows"),
link_name = "je_mallocx")]
fn mallocx(size: size_t, flags: c_int) -> *mut c_void;
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios",
target_os = "dragonfly"),
target_os = "dragonfly", target_os = "windows"),
link_name = "je_rallocx")]
fn rallocx(ptr: *mut c_void, size: size_t, flags: c_int) -> *mut c_void;
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios",
target_os = "dragonfly"),
target_os = "dragonfly", target_os = "windows"),
link_name = "je_xallocx")]
fn xallocx(ptr: *mut c_void, size: size_t, extra: size_t, flags: c_int) -> size_t;
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios",
target_os = "dragonfly"),
target_os = "dragonfly", target_os = "windows"),
link_name = "je_sdallocx")]
fn sdallocx(ptr: *mut c_void, size: size_t, flags: c_int);
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios",
target_os = "dragonfly"),
target_os = "dragonfly", target_os = "windows"),
link_name = "je_nallocx")]
fn nallocx(size: size_t, flags: c_int) -> size_t;
}
Expand Down
9 changes: 9 additions & 0 deletions src/libcollections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1654,6 +1654,15 @@ impl<'a, K: Ord, V> Entry<'a, K, V> {
Vacant(entry) => entry.insert(default()),
}
}

/// Returns a reference to this entry's key.
#[unstable(feature = "map_entry_keys", issue = "32281")]
pub fn key(&self) -> &K {
match *self {
Occupied(ref entry) => entry.key(),
Vacant(ref entry) => entry.key(),
}
}
}

impl<'a, K: Ord, V> VacantEntry<'a, K, V> {
Expand Down
4 changes: 2 additions & 2 deletions src/libcollections/btree/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,9 @@ impl<T: Ord> BTreeSet<T> {

/// Adds a value to the set.
///
/// If the set did not have a value present, `true` is returned.
/// If the set did not have this value present, `true` is returned.
///
/// If the set did have this key present, `false` is returned, and the
/// If the set did have this value present, `false` is returned, and the
/// entry is not updated. See the [module-level documentation] for more.
///
/// [module-level documentation]: index.html#insert-and-complex-keys
Expand Down
7 changes: 2 additions & 5 deletions src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,8 @@ extern "rust-intrinsic" {

/// The size of a type in bytes.
///
/// This is the exact number of bytes in memory taken up by a
/// value of the given type. In other words, a memset of this size
/// would *exactly* overwrite a value. When laid out in vectors
/// and structures there may be additional padding between
/// elements.
/// More specifically, this is the offset in bytes between successive
/// items of the same type, including alignment padding.
pub fn size_of<T>() -> usize;

/// Moves a value to an uninitialized memory location.
Expand Down
17 changes: 17 additions & 0 deletions src/libcore/iter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,23 @@ impl<A, B> Iterator for Chain<A, B> where
}
}

#[inline]
fn find<P>(&mut self, mut predicate: P) -> Option<Self::Item> where
P: FnMut(&Self::Item) -> bool,
{
match self.state {
ChainState::Both => match self.a.find(&mut predicate) {
None => {
self.state = ChainState::Back;
self.b.find(predicate)
}
v => v
},
ChainState::Front => self.a.find(predicate),
ChainState::Back => self.b.find(predicate),
}
}

#[inline]
fn last(self) -> Option<A::Item> {
match self.state {
Expand Down
3 changes: 3 additions & 0 deletions src/libcore/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ pub fn forget<T>(t: T) {

/// Returns the size of a type in bytes.
///
/// More specifically, this is the offset in bytes between successive
/// items of the same type, including alignment padding.
///
/// # Examples
///
/// ```
Expand Down
13 changes: 13 additions & 0 deletions src/libcore/num/int_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#![doc(hidden)]

#[cfg(stage0)]
macro_rules! int_module { ($T:ty, $bits:expr) => (

// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
Expand All @@ -25,3 +26,15 @@ pub const MIN: $T = (-1 as $T) << ($bits - 1);
pub const MAX: $T = !MIN;

) }

#[cfg(not(stage0))]
macro_rules! int_module { ($T:ident, $bits:expr) => (

#[stable(feature = "rust1", since = "1.0.0")]
#[allow(missing_docs)]
pub const MIN: $T = $T::min_value();
#[stable(feature = "rust1", since = "1.0.0")]
#[allow(missing_docs)]
pub const MAX: $T = $T::max_value();

) }
13 changes: 13 additions & 0 deletions src/libcore/num/uint_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#![doc(hidden)]

#[cfg(stage0)]
macro_rules! uint_module { ($T:ty, $bits:expr) => (

#[stable(feature = "rust1", since = "1.0.0")]
Expand All @@ -20,3 +21,15 @@ pub const MIN: $T = 0 as $T;
pub const MAX: $T = !0 as $T;

) }

#[cfg(not(stage0))]
macro_rules! uint_module { ($T:ident, $bits:expr) => (

#[stable(feature = "rust1", since = "1.0.0")]
#[allow(missing_docs)]
pub const MIN: $T = $T::min_value();
#[stable(feature = "rust1", since = "1.0.0")]
#[allow(missing_docs)]
pub const MAX: $T = $T::max_value();

) }
13 changes: 13 additions & 0 deletions src/libcoretest/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,19 @@ fn test_iterator_chain_count() {
assert_eq!(zs.iter().chain(&ys).count(), 4);
}

#[test]
fn test_iterator_chain_find() {
let xs = [0, 1, 2, 3, 4, 5];
let ys = [30, 40, 50, 60];
let mut iter = xs.iter().chain(&ys);
assert_eq!(iter.find(|&&i| i == 4), Some(&4));
assert_eq!(iter.next(), Some(&5));
assert_eq!(iter.find(|&&i| i == 40), Some(&40));
assert_eq!(iter.next(), Some(&50));
assert_eq!(iter.find(|&&i| i == 100), None);
assert_eq!(iter.next(), None);
}

#[test]
fn test_filter_map() {
let it = (0..).step_by(1).take(10)
Expand Down
14 changes: 12 additions & 2 deletions src/librustc/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,17 @@ fn foo(x: u8) -> u8 {
```

It is advisable to find out what the unhandled cases are and check for them,
returning an appropriate value or panicking if necessary.
returning an appropriate value or panicking if necessary. Check if you need
to remove a semicolon from the last expression, like in this case:

```ignore
fn foo(x: u8) -> u8 {
inner(2*x + 1);
}
```

The semicolon discards the return value of `inner`, instead of returning
it from `foo`.
"##,

E0270: r##"
Expand Down Expand Up @@ -1569,5 +1579,5 @@ register_diagnostics! {
E0490, // a value of type `..` is borrowed for too long
E0491, // in type `..`, reference has a longer lifetime than the data it...
E0495, // cannot infer an appropriate lifetime due to conflicting requirements
E0524, // expected a closure that implements `..` but this closure only implements `..`
E0525, // expected a closure that implements `..` but this closure only implements `..`
}
Loading