Commit Graph

52498 Commits

Author SHA1 Message Date
Lukas Kalbertodt
bf3aefeba0 Add contains to VecDeque and LinkedList (+ tests) 2016-04-14 16:07:53 +02:00
bors
fbf8a8ce5e Auto merge of #32892 - brson:relnotes19, r=alexcrichton
Release notes for 1.9
2016-04-14 05:58:25 -07:00
Andrew Paseltiner
cf37af1627
Specialize Extend to append for {LinkedList, Vec} 2016-04-14 07:12:45 -04:00
bors
c9f15013e0 Auto merge of #32883 - sanxiyn:nameless-defkey, r=arielb1
Do not encode name when encoding DefKey

Since name is encoded anyway, name in DefKey is redundant.

cc #32719.
2016-04-14 03:49:14 -07:00
bors
374d262b3a Auto merge of #32718 - timonvo:bootstrap-skip-docs, r=alexcrichton
rustbuild: Skip generating docs if the config disables them.

r? @alexcrichton
2016-04-14 00:38:58 -07:00
Eduard Burtescu
cd85120ef9 trans: always register an item's symbol, even if duplicated. 2016-04-14 08:39:23 +03:00
bors
0cb2ee2ef6 Auto merge of #32877 - oli-obk:const_err_multi, r=arielb1
don't report errors in constants at every use site

partially fixes #32842

r? @arielb1
cc @retep998

I chose this way of implementing it, because the alternative (checking if the error span is inside the constant's expressions's span) would get confusing when combined with expression generating macros.

A next step would be to re-enable the re-reporting of errors if the original erroneous constant is in another crate.
2016-04-13 22:33:10 -07:00
Jeffrey Seyfried
44c78eeb46 Feature gate pub(restricted) 2016-04-14 04:58:42 +00:00
Jeffrey Seyfried
50ce605f46 Parse pub(restricted) 2016-04-14 04:58:38 +00:00
Jeffrey Seyfried
0833a89a3e resolve: refactor away PRIVATE_VARIANT and ensure that restricted
reexports of private variants are handled correctly.
2016-04-14 04:58:32 +00:00
Jeffrey Seyfried
a0c3ce3424 resolve: use the Restricted variant of ty::Visibility when privacy checking 2016-04-14 04:57:33 +00:00
Jeffrey Seyfried
a4196cd490 resolve: Use vis: ty::Visibility instead of is_public: bool 2016-04-14 04:56:21 +00:00
Jeffrey Seyfried
3bf9fc0c2a Fix fallout in rustdoc 2016-04-14 04:53:33 +00:00
Jeffrey Seyfried
1e5942469d Add Crate and Restricted variants to hir::Visibility 2016-04-14 04:53:27 +00:00
Jeffrey Seyfried
2b2e4dda21 Visit visibilities in the ast visitor's walk_* functions 2016-04-14 04:52:28 +00:00
Jeffrey Seyfried
4b189e65c8 Add a span to the Crate variant of ast::Visibility 2016-04-14 04:48:05 +00:00
pierzchalski
d8d8669439 Delegate whether to print docblocks to 'document'
Add test to check this resolves #24838 and #26871.
2016-04-14 13:57:01 +10:00
Alex Burka
01aebf01bc implement RFC amendment 1494 2016-04-13 23:25:42 -04:00
Nick Platt
e0f997d347 rustbuild: Verify sha256 of downloaded tarballs 2016-04-13 22:10:42 -04:00
Nick Platt
ffff91a8e8 rustbuild: Improve error messaging in bootstrap.py
For normal invocations, print a short error message and exit. When
the verbose option is enabled, also print the backtrace.
2016-04-13 22:10:25 -04:00
Timon Van Overveldt
2805e83dcb rustbuild: Skip generating docs if the config disables them.
It looks like before these config variables weren't actually taken
into account. This patch should make the build system skip over the
documentation steps correctly.
2016-04-13 18:36:58 -07:00
Jeffrey Seyfried
974f1eff58 Add test for issue #31856 2016-04-14 01:23:04 +00:00
bors
adb0923492 Auto merge of #32944 - alexcrichton:add-to-gitignore, r=brson
Add /obj/ to .gitignore

This is the build directory our buildbots use, and right now the bots are
running `git clean -f -f -d` to remove all untracked files between runs and this
is accidentally deleting `obj`, so we're building LLVM a lot.

Hopefully this keeps the bots caching `obj` so we can clean it out manually and
leave LLVM around.
2016-04-13 17:50:12 -07:00
Alex Crichton
de1838148c Add /obj/ to .gitignore
This is the build directory our buildbots use, and right now the bots are
running `git clean -f -f -d` to remove all untracked files between runs and this
is accidentally deleting `obj`, so we're building LLVM a lot.

Hopefully this keeps the bots caching `obj` so we can clean it out manually and
leave LLVM around.
2016-04-13 17:46:01 -07:00
bors
2b60207231 Auto merge of #32592 - tbu-:pr_range_from_overflow, r=alexcrichton
Add a note about overflowing in the `RangeFrom` iterator
2016-04-13 14:26:10 -07:00
Gigih Aji Ibrahim
2bf000349a fix str::split_at_mut() example 2016-04-14 03:43:29 +07:00
bors
35dca7fb7b Auto merge of #32780 - soltanmm:consider-the-following, r=nikomatsakis
Replace consider_unification_despite_ambiguity with new obligation variant

Is work towards #32730. Addresses part one of #32286. Addresses #24210 and #26046 to some degree.

r? @nikomatsakis
2016-04-13 11:28:30 -07:00
Tobias Bucher
6acd90f0c9 Add a note about overflowing in the RangeFrom iterator 2016-04-13 20:09:15 +02:00
mitaa
ea83349c9f Retire rustdocs ANALYSISKEY
The thread-local isn't needed and consists of mostly empty fields which
were just used to move the data into `html::render::CACHE_KEY`.
2016-04-13 19:39:17 +02:00
Georg Brandl
05a3fea8f6 Fix a typo and add a missing word 2016-04-13 19:35:21 +02:00
Deepak Kannan
a40629d2c9 Doc fix: Do not mention next project in book/guessing-game
The next project refers to the dining-philosophers problem
27a1834ce5/src/doc/book/dining-philosophers.md

which was removed in
0c6c34de87

so removing reference to that project from book/guessing-game
2016-04-13 21:53:47 +05:30
Masood Malekghassemi
de82fc4dc6 Fix obscure compilation error 2016-04-13 07:48:53 -07:00
bors
525aa61022 Auto merge of #32828 - vadimcn:symlinks, r=alexcrichton
Do not rely on file extensions after path canonicalization.

Rustc does not recognize libraries which are symlinked to files having extension other than .rlib. The problem is that find_library_crate calls fs::canonicalize on found library paths, but then the resulting path is passed to get_metadata_section, which assumes it will end in ".rlib" if it's an rlib (from https://internals.rust-lang.org/t/is-library-path-canonicalization-worth-it/3206).

cc #29433
2016-04-13 07:16:20 -07:00
Deepak Kannan
722faa024b Doc fix: Update Cargo.toml in book/getting-started
The Cargo.toml mentioned in book/getting-started
is missing the section called `[dependencies]`
2016-04-13 17:06:24 +05:30
bors
6136a86291 Auto merge of #32817 - jseyfried:warn_impl_param_defaults, r=nikomatsakis
Warn for type parameter defaults on impl blocks

Warn for type parameter defaults on impl blocks (fixes #31543).
r? @nikomatsakis
2016-04-13 04:18:36 -07:00
Manish Goregaokar
3e93a6e265 Make librustc_mir pass rustdoc --test 2016-04-13 16:16:14 +05:30
Manish Goregaokar
327ce2ecf9 Make librustc_mir pass rustdoc 2016-04-13 16:13:24 +05:30
Leo Testard
340eff6604 Update a comment to reflect changes in tidy checks. 2016-04-13 11:27:30 +02:00
bors
7d4d3cb0be Auto merge of #32726 - asomers:master, r=alexcrichton
Fix stack overflow detection on FreeBSD
2016-04-13 01:20:15 -07:00
bors
4b71f8d141 Auto merge of #32814 - jseyfried:improve_duplicate_glob_detection, r=nikomatsakis
resolve: Improve duplicate glob detection

This fixes a bug introduced in #31726 in which we erroneously allow multiple imports of the same item under some circumstances.

More specifically, we erroneously allow a module that is in a cycle of glob re-exports to have other re-exports (besides the glob from the cycle).
For example,
```rust
pub fn f() {}
mod foo {
    pub use f; // (1) This defines `foo::f`.
    pub use bar::*; // (3) This also defines `foo::f`, which should be a duplicate error but is currently allowed.
}
mod bar {
    pub use foo::*; // (2) This defines `bar::f`.
}
```

A module in a glob re-export cycle can still have `pub` items after this PR. For example,
```rust
mod foo {
    pub fn f() {}; // (1) This defines `foo::f`.
    pub use bar::*; // (3) This is not a duplicate error since items shadow glob-imported re-exports (cf #31337).
}
mod bar {
    pub use foo::*; // (2) This defines `bar::f`.
}
```
r? @nikomatsakis
2016-04-12 22:21:23 -07:00
bors
7c27cce9e5 Auto merge of #32803 - eddyb:mir-debuginfo, r=nikomatsakis
Initial implementation of debuginfo in MIR trans.

Progress is made towards #31005, but several issues remain, such as #32790.
2016-04-12 19:22:32 -07:00
Jeffrey Seyfried
f08f75f25c Add regression test 2016-04-13 00:24:43 +00:00
Jeffrey Seyfried
5a8bbf1202 Fixes #32922, a macro hygiene bug 2016-04-13 00:24:21 +00:00
bors
a43eb4e774 Auto merge of #32590 - alexcrichton:rustbuild-tidy-checks, r=brson
rustbuild: Migrate tidy checks to Rust

This commit rewrites all of the tidy checks we have, namely:

* featureck
* errorck
* tidy
* binaries

into Rust under a new `tidy` tool inside of the `src/tools` directory. This at
the same time deletes all the corresponding Python tidy checks so we can be sure
to only have one source of truth for all the tidy checks.

cc #31590
2016-04-12 16:24:33 -07:00
Alex Crichton
7bfaeaaf9c tidy: Add a check to ensure Cargo.toml is in sync
This verifies that the crates listed in the `[dependencies]` section of
`Cargo.toml` are a subset of the crates listed in `lib.rs` for our in-tree
crates. This should help ensure that when we refactor crates over time we keep
these dependency lists in sync.
2016-04-12 15:55:14 -07:00
Brian Anderson
bbcfcfc61d Release notes for 1.9 2016-04-12 21:23:44 +00:00
David Tolnay
3d50ad7332 Bare raw pointers have been disallowed forever
This change was in 0.12.0, a year and a half ago. Let's move on!
2016-04-12 13:49:54 -07:00
bors
a4f781e477 Auto merge of #31963 - barosl:rename-doc, r=alexcrichton
Describe more platform-specific behaviors of `std::fs::rename`

I did some tests myself regarding the situation when both `from` and `to` exist, and the results were:

On Linux:

`from` | `to` | Result
---- | ---- | ----
Directory | Directory | Ok
Directory | File | Error
File | Directory | Error
File | File | Ok

On Windows:

`from` | `to` | Result
---- | ---- | ----
Directory | Directory | Error
Directory | File | Ok
File | Directory | Error
File | File | Ok

This is a bit against the official MSDN documentation, which says "(`MOVEFILE_REPLACE_EXISTING`) cannot be used if `lpNewFileName` or `lpExistingFileName` names a directory." As evidenced above, `lpExistingFileName` *can* be a directory.

I also mentioned the atomicity of the operation.

Fixes #31301.
2016-04-12 10:12:55 -07:00
Alex Crichton
9dd3c54a2c rustbuild: Migrate tidy checks to Rust
This commit rewrites all of the tidy checks we have, namely:

* featureck
* errorck
* tidy
* binaries

into Rust under a new `tidy` tool inside of the `src/tools` directory. This at
the same time deletes all the corresponding Python tidy checks so we can be sure
to only have one source of truth for all the tidy checks.

cc #31590
2016-04-12 08:17:42 -07:00
Kamal Marhubi
62945b6ce3 collections: Add slice::binary_search_by_key
This method adds to the family of `_by_key` methods, and is the
counterpart of `slice::sort_by_key`. It was mentioned on #30423 but
was not implemented at that time.

Refs #30423
2016-04-12 10:31:02 -04:00