Commit Graph

56078 Commits

Author SHA1 Message Date
bors
92ae4ceb6c Auto merge of #34366 - Diggsey:rust-src-pkg, r=brson
Produce source package in rust-installer format

See rust-lang/rust-buildbot#102

There may be a better way to do this, wasn't sure how to clean-up the `rust-src-image` directory when it's used by multiple make rules.
2016-08-14 09:34:18 -07:00
bors
2e29b126b6 Auto merge of #35534 - michaelwoerister:fix-const-collection2, r=nikomatsakis
Make the translation item collector handle *uses* of 'const' items instead of declarations.

This should fix issue #34754.
2016-08-14 06:42:16 -07:00
Christopher Serr
e586d2174b Improve No stdlib and related Documentation 2016-08-14 13:33:53 +02:00
bors
d927fa4856 Auto merge of #34206 - petrochenkov:pipdeny, r=nikomatsakis
Make `private_in_public` compatibility lint deny-by-default

In accordance with the [plan](https://internals.rust-lang.org/t/fcp-for-various-future-compatibility-warnings/3590/5?u=petrochenkov).

r? @nikomatsakis
2016-08-14 03:50:50 -07:00
Rahul Sharma
02fa14fc8e updated compile-fail tests 2016-08-14 16:18:58 +05:30
Eduard Burtescu
1bb1444516 Get rid of the .note interpretation of rustc dylib metadata. 2016-08-14 11:16:28 +03:00
bors
eec30ea657 Auto merge of #35453 - jseyfried:hygienize_metavariables, r=nrc
macros: Make metavariables hygienic

This PR makes metavariables hygienic. For example, consider:
```rust
macro_rules! foo {
    ($x:tt) => { // Suppose that this token tree argument is always a metavariable.
        macro_rules! bar { ($x:expr, $y:expr) => { ($x, $y) } }
    }
}

fn main() {
    foo!($z); // This currently compiles.
    foo!($y); // This is an error today but compiles after this PR.
}
```
Today, the `macro_rules! bar { ... }` definition is only valid when the metavariable passed to `foo` is not `$y` (since it unhygienically conflicts with the `$y` in the definition of `bar`) or `$x` (c.f. #35450).

After this PR, the definition of `bar` is always valid (and `bar!(a, b)` always expands to `(a, b)` as expected).

This can break code that was allowed in #34925 (landed two weeks ago). For example,
```rust
macro_rules! outer {
    ($t:tt) => {
        macro_rules! inner { ($i:item) => { $t } }
    }
}

outer!($i); // This `$i` should not interact with the `$i` in the definition of `inner!`.
inner!(fn main() {}); // After this PR, this is an error ("unknown macro variable `i`").
```

Due to the severe limitations on nested `macro_rules!` before #34925, this is not a breaking change for stable/beta.

Fixes #35450.

r? @nrc
2016-08-13 23:37:11 -07:00
Ivan Ukhov
10fce6e2d7 Fix a couple of typos in RawVec 2016-08-14 06:59:43 +02:00
Eduard Burtescu
02aec40dc9 [MIR] Add Storage{Live,Dead} statements to emit llvm.lifetime.{start,end}. 2016-08-14 06:34:14 +03:00
Terry Sun
19a33371eb Update E0207 label to report parameter type
Fixes #35642.
2016-08-13 21:57:13 -04:00
Diggory Blake
b3908d08ee Fix make-tidy lock file checks 2016-08-13 22:36:04 +01:00
Jeffrey Seyfried
4943e96a0c Add regression test. 2016-08-13 20:08:45 +00:00
Jeffrey Seyfried
b08043ee69 Allow attributes to be marked used before cfg proccessing. 2016-08-13 20:08:42 +00:00
bors
2b7ea14cc4 Auto merge of #35414 - jupp0r:feature/test-threads-flag, r=alexcrichton
Add --test-threads option to test binaries

This change allows parallelism of test runs to be specified by a
command line flag names --test-threads in addition to the existing
environment variable RUST_TEST_THREADS. Fixes #25636.
2016-08-13 09:52:49 -07:00
Andrew Cann
0add394ee3 Remove diagnostic E0166 2016-08-14 00:30:05 +08:00
Oliver Middleton
616b101e3f rustdoc: Don't include the path for primitive methods in the search results
Displaying `std::u32::max_value` is misleading so just display
`u32::max_value`.
2016-08-13 15:57:44 +01:00
Oliver Middleton
5940150841 rustdoc: Fix links to static items in the search results 2016-08-13 15:48:38 +01:00
Andrew Cann
c3131f256d Fix bug in PostExpansionVisitor 2016-08-13 21:37:09 +08:00
Andrew Cann
ef1b507535 Fix build after rebase 2016-08-13 21:37:09 +08:00
Andrew Cann
6b8dacee9e Improve comments on ! tests 2016-08-13 21:37:09 +08:00
Andrew Cann
5bd54a2468 Fix make tidy 2016-08-13 21:37:09 +08:00
Andrew Cann
29f3636282 Add explanations to tests 2016-08-13 21:37:09 +08:00
Andrew Cann
bcff5a78b3 Permit ! as T with test 2016-08-13 21:37:09 +08:00
Andrew Cann
06747c669f Add another test for ! 2016-08-13 21:37:09 +08:00
Andrew Cann
00a71ea644 Add tests for ! type 2016-08-13 21:37:09 +08:00
Andrew Cann
2eff282aef Add some tests for ! type 2016-08-13 21:37:09 +08:00
Andrew Cann
c6890e17a0 Revert Ty::is_uninhabited to its original state 2016-08-13 21:37:09 +08:00
Andrew Cann
a4e6009bf0 Minor fixups based on feedback 2016-08-13 21:37:09 +08:00
Andrew Cann
a05560bebe Add run-pass/never_coercions.rs test 2016-08-13 21:37:09 +08:00
Andrew Cann
f019a92b77 Correctly handle AdjustNeverToAny in try_find_coercion_lub 2016-08-13 21:37:09 +08:00
Andrew Cann
69e27614c6 Minor fixup. 2016-08-13 21:37:09 +08:00
Andrew Cann
a6d6fff068 Lookup node type in map rather than using write_ty_expr 2016-08-13 21:37:09 +08:00
Andrew Cann
3639341685 Default diverging types based on feature gate.
Default to either `!` or `()` depending on whether feature(never_type)
is on or not.
2016-08-13 21:37:09 +08:00
Andrew Cann
54c72d8f98 Minor fix 2016-08-13 21:37:09 +08:00
Andrew Cann
8010314190 Un-improve Ty::is_uninabited 2016-08-13 21:37:09 +08:00
Andrew Cann
fadabe08f5 Rename empty/bang to never
Split Ty::is_empty method into is_never and is_uninhabited
2016-08-13 21:37:09 +08:00
Andrew Cann
f0a8b6d43f Minor fixups based on @eddyb's feedback
Mainly, remove mk_empty() method and replace with tcx.types.empty
2016-08-13 21:37:09 +08:00
Andrew Cann
5096a8c5c0 Control usage of ! through a feature gate.
Adds the `bang_type` feature gate. `!` in a non-return-type position now
relies on that feature.
2016-08-13 21:37:09 +08:00
Andrew Cann
0e1c2aa52e Make AdjustEmptyToAny actually perform the adjustment 2016-08-13 21:37:09 +08:00
Andrew Cann
ba65d2e15b Remove invalid compile-fail tests related to !
These tests check for the old error messages "`return` in a function
declared as diverging" and "computation may converge in a function
declared as diverging". The first of these is now invalid as `return` is
permitted in functions that return `!`. The second of these is subsumed
by the "mismatched types" error.
2016-08-13 21:37:09 +08:00
Andrew Cann
51c6ae25e2 implement std::cmp::* traits for ! 2016-08-13 21:37:09 +08:00
Andrew Cann
b22beed737 Fix build after rebase to lastest master 2016-08-13 21:37:09 +08:00
Andrew Cann
ed02344fbc Remove obsolete divergence related stuff
Replace FnOutput with Ty
Replace FnConverging(ty) with ty
Purge FnDiverging, FunctionRetTy::NoReturn and FunctionRetTy::None
2016-08-13 21:37:09 +08:00
Andrew Cann
ee78f37e2a impl Debug + Display for ! 2016-08-13 21:37:09 +08:00
Andrew Cann
082915290d Make unused lint ignore unused ! 2016-08-13 21:37:09 +08:00
Andrew Cann
f31d9757f8 Fix super_relate_tys so that ! == ! 2016-08-13 21:37:09 +08:00
Andrew Cann
104963c539 Switch on TyEmpty
Parse -> ! as FnConverging(!)
Add AdjustEmptyToAny coercion to all ! expressions
Some fixes
2016-08-13 21:37:09 +08:00
Andrew Cann
9f9f8567eb Fix rustdoc after rebase 2016-08-13 21:37:09 +08:00
Andrew Cann
533a389962 Small optimization
Optimiize ExprKind::EmptyToAny expressions applied to function calls.
2016-08-13 21:37:09 +08:00
Andrew Cann
798f719daf Add run-fail/adjust_empty.rs test 2016-08-13 21:37:09 +08:00