Commit Graph

58231 Commits

Author SHA1 Message Date
Andrea Pretto
88b031e6ef save-analysis: dump data only if get_path_data doesn't fail to resolve a path.
Fixes #37126.
2016-10-14 11:01:43 +02:00
Nicholas Nethercote
029dceedb9 Avoid many CrateConfig clones.
This commit changes `ExtCtx::cfg()` so it returns a `CrateConfig`
reference instead of a clone. As a result, it also changes all of the
`cfg()` callsites to explicitly clone... except one, because the commit
also changes `macro_parser::parse()` to take `&CrateConfig`. This is
good, because that function can be hot, and `CrateConfig` is expensive
to clone.

This change almost halves the number of heap allocations done by rustc
for `html5ever` in rustc-benchmarks suite, which makes compilation 1.20x
faster.
2016-10-14 16:38:12 +11:00
bors
17af6b94b2 Auto merge of #36743 - SimonSapin:dedup-by, r=alexcrichton
Add Vec::dedup_by and Vec::dedup_by_key
2016-10-13 19:56:53 -07:00
Danny Hua
2ebef83f52 add (missing) tar to list of packages to get under mingw 2016-10-13 19:38:49 -07:00
Ariel Ben-Yehuda
a61d85b2fe add a per-param-env cache to impls_bound
There used to be only a global cache, which led to uncached calls to
trait selection when there were type parameters.

I'm running a check that there are no adverse performance effects.

Fixes #37106 (drop elaboration times are now ~half of borrow checking,
so might still be worthy of optimization, but not critical).
2016-10-14 00:19:19 +03:00
bors
098d228459 Auto merge of #37151 - alexcrichton:fix-master, r=alexcrichton
rustbuild: Less panics in musl_root

Don't panic if the target wasn't configured.
2016-10-13 13:12:52 -07:00
Alex Crichton
651bb69ecd rustbuild: Less panics in musl_root
Don't panic if the target wasn't configured.
2016-10-13 12:02:27 -07:00
Michael Woerister
8d5b523eb0 debuginfo: Create debuginfo for re-aggregated spread_arg instead of for the individual pieces. 2016-10-13 14:55:31 -04:00
Ariel Ben-Yehuda
ee338c31fe normalize types every time HR regions are erased
Associated type normalization is inhibited by higher-ranked regions.
Therefore, every time we erase them, we must re-normalize.

I was meaning to introduce this change some time ago, but we used
to erase regions in generic context, which broke this terribly (because
you can't always normalize in a generic context). That seems to be gone
now.

Ensure this by having a `erase_late_bound_regions_and_normalize`
function.

Fixes #37109 (the missing call was in mir::block).
2016-10-13 19:17:53 +03:00
Ariel Ben-Yehuda
68ca911d8f Revert "normalize tuple pair types"
This reverts commit 7badc32005.
2016-10-13 19:16:05 +03:00
Nabeel Omer
b491ddd0f0 Update 2016-10-13 21:07:18 +05:30
Nabeel Omer
cd314ab058 Updated RwLock Docs 2016-10-13 20:37:09 +05:30
Adam Perry
48b3dd11f5 Adding FIXME for noop Substs::params. 2016-10-13 07:54:06 -07:00
Felix S. Klock II
c239fee2b6 fix typo in diagnostic sample code 2016-10-13 13:44:57 +02:00
Vadim Petrochenkov
348c3fb085 Add assert checking that allocation and deallocation sizes are equal 2016-10-13 14:05:59 +03:00
Mikko Rantanen
cb90723f90 Explain motivation behind lifetimes
Start the lifetime section with an explanation of the issues that
lack of explicit lifetimes cause and how lifetimes alleviate these.
2016-10-13 01:37:13 +03:00
Fabian Frei
595b754a4b Changed error message E0408 to new format
r? @jonathandturner
2016-10-13 00:16:52 +02:00
Vadim Petrochenkov
6d062809cb Get rid of double indirection in string interner by using Rc<str> 2016-10-13 01:15:33 +03:00
Vadim Petrochenkov
ef3a6a8ee6 Add an unstable constructor for creating Rc<str> from str 2016-10-13 00:45:05 +03:00
bors
d34318dd53 Auto merge of #37118 - alexcrichton:rollup, r=alexcrichton
Rollup of 17 pull requests

- Successful merges: #36762, #36831, #36973, #36991, #36995, #37023, #37049, #37050, #37056, #37064, #37066, #37067, #37084, #37089, #37091, #37092, #37110
- Failed merges:
2016-10-12 14:42:12 -07:00
Felix S. Klock II
8dd9493cf2 placate diagnostic checking tests by fixing sample code in E0569. 2016-10-12 23:39:08 +02:00
Alex Crichton
27043b15af Rollup merge of #37110 - TimNN:fix-37109, r=eddyb
normalize tuple pair types in trans

Fixes #37109.

Note that #37109 is a regression from stable to stable, beta and nightly.
2016-10-12 14:07:57 -07:00
Alex Crichton
25ad6a3c12 Rollup merge of #37092 - alexcrichton:update-libc, r=japaric
std: Update liblibc submodule

This fixes compilation on the s390x target
2016-10-12 14:07:57 -07:00
Alex Crichton
81494843b0 Rollup merge of #37091 - alexcrichton:configure, r=brson
configure: Fix gcc detection for LLVM

We have a case where 32-bit compilation accidentally requested clang when gcc
was the only one available.
2016-10-12 14:07:56 -07:00
Alex Crichton
8f10d6652a Rollup merge of #37089 - GuillaumeGomez:io_urls, r=frewsxcv
Add missing urls in io module

r? @steveklabnik
2016-10-12 14:07:56 -07:00
Alex Crichton
20991829e2 Rollup merge of #37084 - jseyfried:cleanup_expanded_macro_use_scopes, r=nrc
macros: clean up scopes of expanded `#[macro_use]` imports

This PR changes the scope of macro-expanded `#[macro_use]` imports to match that of unexpanded `#[macro_use]` imports. For example, this would be allowed:
```rust
example!();
macro_rules! m { () => { #[macro_use(example)] extern crate example_crate; } }
m!();
```

This PR also enforces the full shadowing restrictions from RFC 1560 on `#[macro_use]` imports (currently, we only enforce the weakened restrictions from #36767).

This is a [breaking-change], but I believe it is highly unlikely to cause breakage in practice.
r? @nrc
2016-10-12 14:07:56 -07:00
Alex Crichton
2d71be5780 Rollup merge of #37067 - jseyfried:expand_derives_last, r=alexcrichton
macros: expand `#[derive]`s after other attribute macros and improve intra-`#[derive]` ordering

Fixes https://github.com/serde-rs/serde/issues/577.
cc #35900
r? @alexcrichton
2016-10-12 14:07:56 -07:00
Alex Crichton
920f10950a Rollup merge of #37066 - nrc:stderr, r=alexcrichton
Error monitor should emit error to stderr instead of stdout

We are pretty consistent about emitting to stderr, except for when there is actually an error, in which case we emit to stdout. This seems a bit backwards. This PR just changes that exception to emit to stderr. This is useful for the RLS since the LS protocol uses stdout (grrr).

r? @alexcrichton
2016-10-12 14:07:56 -07:00
Alex Crichton
f05bd1b41d Rollup merge of #37064 - nnethercote:read_str, r=eddyb
Avoid allocations in `Decoder::read_str`.

`opaque::Decoder::read_str` is very hot within `rustc` due to its use in
the reading of crate metadata, and it currently returns a `String`. This
commit changes it to instead return a `Cow<str>`, which avoids a heap
allocation.

This change reduces the number of calls to `malloc` by almost 10% in
some benchmarks.

This is a [breaking-change] to libserialize.
2016-10-12 14:07:56 -07:00
Alex Crichton
a0ad6616fc Rollup merge of #37056 - Mark-Simulacrum:fix-bool-comparison, r=bluss
Add comparison operators to boolean const eval.

I think it might be worth adding tests here, but since I don't know how or where to do that, I have not done so yet. Willing to do so if asked and given an explanation as to how.

Fixes #37047.
2016-10-12 14:07:55 -07:00
Alex Crichton
5ac7f4fc31 Rollup merge of #37050 - frewsxcv:librustdoc, r=alexcrichton
librustdoc refactoring and cleanup.
2016-10-12 14:07:55 -07:00
Alex Crichton
4e65489e77 Rollup merge of #37049 - srinivasreddy:librustc_lint, r=nrc
run rustfmt on librustc_lint folder
2016-10-12 14:07:55 -07:00
Alex Crichton
65fc3ef1f4 Rollup merge of #37023 - jseyfried:fix_extern_crate_back_compat, r=nrc
Fix importing inaccessible `extern crate`s (with a warning)

Fixes #36747, fixes #37020, and fixes #37021.
r? @nrc
2016-10-12 14:07:55 -07:00
Alex Crichton
9d70ff384f Rollup merge of #36995 - nrc:stable, r=@nikomatsakis
stabilise ?, attributes on stmts, deprecate Reflect

r? @nikomatsakis
2016-10-12 14:07:55 -07:00
Alex Crichton
d13b102c54 Rollup merge of #36991 - wesleywiser:fixme_1, r=arielb1
Move IdxSetBuf and BitSlice to rustc_data_structures

Resolves a FIXME
2016-10-12 14:07:54 -07:00
est31
87cbfb455f Change color and make ? bold 2016-10-12 22:45:41 +02:00
bors
9cb01365ee Auto merge of #36762 - achanda:sockaddr_type, r=alexcrichton
Add two functions to check type of SockAddr

These can be used to determine the type of the underlying IP
address

r? @alexcrichton
2016-10-12 11:28:53 -07:00
Srinivas Reddy Thatiparthy
5457c35ece
run rustfmt on libcore/num folder 2016-10-12 23:57:46 +05:30
Niko Matsakis
b486a8757c add test case for changing private methods 2016-10-12 14:18:03 -04:00
Srinivas Reddy Thatiparthy
6a738c6a8a
run rustfmt on liblog 2016-10-12 23:45:03 +05:30
Srinivas Reddy Thatiparthy
ca397681bb
run rustfmt on librand 2016-10-12 23:40:25 +05:30
Alex Burka
1eb36b80a4 book: remove backticks in Type Aliases header
Fix #37116.
2016-10-12 13:44:08 -04:00
Felix S. Klock II
0562654608 Some tests to check that lifetime parametric fn's do not trip up LLVM. 2016-10-12 19:29:50 +02:00
Felix S. Klock II
f166930dfa Inject bitcast if types mismatch when building a store instruction. 2016-10-12 19:26:06 +02:00
Alex Crichton
091b547122 Rollup merge of #36831 - michaelwoerister:ich-updates, r=nikomatsakis
incr.comp.: Minor refactoring and update to struct ICH test case

r? @nikomatsakis
2016-10-12 10:15:26 -07:00
Alex Crichton
76fb6e7761 Rollup merge of #36762 - achanda:sockaddr_type, r=alexcrichton
Add two functions to check type of SockAddr

These can be used to determine the type of the underlying IP
address

r? @alexcrichton
2016-10-12 10:15:25 -07:00
Guillaume Gomez
96a8bae3da add missing urls for BufWriter and BufReader 2016-10-12 18:27:04 +02:00
Felix S. Klock II
fa7f69cdaa tests for #[may_dangle] attribute. 2016-10-12 18:24:23 +02:00
Felix S. Klock II
e185cd5190 Fix bug in test for E0199 and add test for E0198.
In particular, as far as I can tell from the error diagnostics, the
former test for E0199 was actually a test for E0198, and there was no
test for E0198.

(I am assuming that one of my previous changes to the `unsafe impl`
checking fixed a latent bug in how these two cases were
differentiated.)
2016-10-12 18:23:23 +02:00
Felix S. Klock II
9a649c328c Require destructors using #[may_dangle] to use unsafe impl. 2016-10-12 18:23:20 +02:00