Commit Graph

91751 Commits

Author SHA1 Message Date
Josh Stone
74a69f2e74
Rollup merge of #57293 - Zoxc:incr-passes3, r=michaelwoerister
Make some lints incremental

Blocked on https://github.com/rust-lang/rust/pull/57253

r? @michaelwoerister
2019-03-27 18:15:18 -07:00
varkor
c6e3ea475b Visit path in walk_mac 2019-03-27 22:41:41 +00:00
Guillaume Gomez
7f2c726d6c Speed up rustdoc run a bit 2019-03-27 19:07:48 +01:00
Eric Huss
5113e73e81 Update books 2019-03-27 11:02:55 -07:00
Mateusz Mikuła
c764890d7c musl: build toolchain libs with -fPIC 2019-03-27 18:37:21 +01:00
hgallagher1993
4d648ce1b9 Better diagnostic for binary operation on BoxedValues 2019-03-27 13:13:09 -04:00
David Wood
4187560bdf
Add comments for new AdtDef functions. 2019-03-27 17:27:21 +01:00
Felix S. Klock II
1f63a52ca2 Regression test for rust-lang/rust#56327. 2019-03-27 17:18:49 +01:00
Felix S. Klock II
6d7e5df3d9 Some tests illustrating where the revised lint does and does not apply. 2019-03-27 17:13:51 +01:00
Chris Gregory
f0a7610724 Add higher-ranked trait bounds link 2019-03-27 12:03:14 -04:00
Nikhil Benesch
3e0db7cecd
Clarify behavior of dbg macro 2019-03-27 11:22:55 -04:00
Andy Russell
e1daa36ba7
replace llvm-rebuild-trigger with commit hash 2019-03-27 10:05:32 -04:00
Taiki Endo
d59b46fd49 Add a test 2019-03-27 22:48:39 +09:00
Felix S. Klock II
6046f4a673 Do not lint dyn tokens under macros.
The existing `KeywordIdents` lint blindly scans the token stream for a
macro or macro definition. It does not attempt to parse the input,
which means it cannot distinguish between occurrences of `dyn` that
are truly instances of it as an identifier (e.g. `let dyn = 3;`)
versus occurrences that follow its usage as a contextual keyword (e.g.
the type `Box<dyn Trait>`).

In an ideal world the lint would parse the token stream in order to
distinguish such occurrences; but in general we cannot do this,
because a macro_rules definition does not specify what parsing
contexts the macro being defined is allowed to be used within.

So rather than put a lot of work into attempting to come up with a
more precise but still incomplete solution, I am just taking the short
cut of not linting any instance of `dyn` under a macro. This prevents
`rustfix` from injecting bugs into legal 2015 edition code.
2019-03-27 14:43:29 +01:00
bors
33ef0bad21 Auto merge of #59415 - varkor:values_since_snapshot, r=eddyb
Refactor InferenceFudger (née RegionFudger)

- Rename `RegionFudger` (and related methods) to `InferenceFudger`.
- Take integer and float inference variables into account.
- Refactor `types_created_since_snapshot` and `vars_created_since_snapshot` with the [new version of ena](https://github.com/rust-lang-nursery/ena/pull/21).
- Some other refactoring in the area.

r? @eddyb
2019-03-27 13:20:16 +00:00
Konrad Borowski
ba21e0b368 Include id in Thread's Debug implementation
Since Rust 1.19.0, id is a stable method, so there is no reason to
not include it in Debug implementation.
2019-03-27 12:28:17 +01:00
Yuki OKUSHI
2368aa8e97 Add some tests 2019-03-27 19:30:33 +09:00
varkor
86d5a69d9d Use Vec instead of FxHashMap 2019-03-27 09:44:55 +00:00
varkor
688cbad9b8 Lookup region variable origin instead of choosing one 2019-03-27 09:44:55 +00:00
varkor
2d48ffa9c6 Store type variable origins in InferenceFudger 2019-03-27 09:44:55 +00:00
varkor
58a04f06cb Propitiate tidy 2019-03-27 09:44:55 +00:00
varkor
3683f51352 Update ena to version 0.13.0 2019-03-27 09:44:55 +00:00
varkor
267370ed58 Use eq_relations 2019-03-27 09:44:55 +00:00
varkor
fa18c129c3 Add next_int_var and next_float_var 2019-03-27 09:44:55 +00:00
varkor
f9d8bb8e2c Simplify fudge_inference_if_ok 2019-03-27 09:44:55 +00:00
varkor
ac94858e32 Add int variables and float variables to InferenceFudger 2019-03-27 09:44:55 +00:00
varkor
1f9a2326b5 Rename RegionFudger to InferenceFudger 2019-03-27 09:44:55 +00:00
varkor
6cc09fc8b2 Remove TypeVariableMap 2019-03-27 09:44:55 +00:00
varkor
abf5e81663 Use Ranges for vars_since_snapshot 2019-03-27 09:44:55 +00:00
varkor
a5c653be63 Simplify TypeVariableTable::vars_since_snapshot 2019-03-27 09:44:55 +00:00
varkor
2a08860ae6 Simplify RegionConstraintCollector::vars_since_snapshot 2019-03-27 09:44:55 +00:00
varkor
92b2021b0a Make vars_since_snapshot naming consistent 2019-03-27 09:44:55 +00:00
varkor
443a2d4f86 Update ena 2019-03-27 09:44:55 +00:00
Mazdak Farrokhzad
ce1c5e0a61 add negative test case in assignment-expected-bool 2019-03-27 10:19:47 +01:00
Mazdak Farrokhzad
0b9c589beb adjust assignment-in-if test accordingly. 2019-03-27 10:19:47 +01:00
Mazdak Farrokhzad
05d59feb64 add test for assignment x = y where type bool is expected. 2019-03-27 10:19:47 +01:00
Mazdak Farrokhzad
7945eff080 generalize diagnostic for x = y where type bool is expected. 2019-03-27 10:19:47 +01:00
bors
c5fb4d0d2f Auto merge of #55780 - ogoffart:span_source_text, r=petrochenkov
Introduce proc_macro::Span::source_text

A function to extract the actual source behind a Span.

Background: I would like to use `syn` in a `build.rs` script to parse the rust code, and extract part of the source code. However, `syn` only gives access to proc_macro2::Span, and i would like to get the source code behind that.
I opened an issue on proc_macro2 bug tracker for this feature https://github.com/alexcrichton/proc-macro2/issues/110  and @alexcrichton said the feature should first go upstream in proc_macro.  So there it is!

Since most of the Span API is unstable anyway, this is guarded by the same `proc_macro_span` feature as everything else.
2019-03-27 08:58:40 +00:00
Mazdak Farrokhzad
bf1068b137 librustc_interface => 2018; rename rustc-rayon to rayon in Cargo.toml 2019-03-27 09:48:50 +01:00
Mazdak Farrokhzad
14f3f6c712 librustc_interface => 2018 2019-03-27 09:41:42 +01:00
Chris Gregory
65b5e57226 Make into itemized list and fix some wording 2019-03-27 01:52:55 -04:00
Chris Gregory
61b6c56f50 Minor rewordings and add dyn keyword 2019-03-27 01:46:24 -04:00
bors
267fb90b55 Auto merge of #59447 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 7 pull requests

Successful merges:

 - #59004 ([rustdoc] Improve "in parameters" search and search more generally)
 - #59026 (Fix moving text in search tabs headers)
 - #59197 (Exclude old book redirect stubs from search engines)
 - #59330 (Improve the documentation for std::convert (From, Into, AsRef and AsMut))
 - #59424 (Fix code block display in portability element in dark theme)
 - #59427 (Link to PhantomData in NonNull documentation)
 - #59432 (Improve some compiletest documentation)

Failed merges:

r? @ghost
2019-03-27 05:25:50 +00:00
Chris Gregory
a68a0e33d1 Add documentation about for used as higher ranked trait bounds
Resolves #55416
2019-03-27 01:23:14 -04:00
Philip Craig
3a5a8a529a Give variant parts their own unique id
and bump llvm version in test
2019-03-27 15:22:37 +10:00
Simonas Kazlauskas
8d4afbe413 Use informational target machine for metadata
Since there is nothing to optimise there...
2019-03-27 04:03:42 +02:00
kenta7777
892f7c430d renames EvalContext to InterpretCx in docs and comments. 2019-03-27 10:57:03 +09:00
bors
dd363d14ae Auto merge of #59285 - cuviper:llvm-8.0.0, r=alexcrichton
Rebase LLVM to 8.0.0 final

r? @alexcrichton
2019-03-27 01:56:14 +00:00
topecongiro
c728ae0fd1 Update rustfmt to 1.2.0 2019-03-27 10:42:13 +09:00
Tim Diekmann
8733b2ab0c
Add Default to std::alloc::System 2019-03-27 00:09:12 +01:00