Commit Graph

102385 Commits

Author SHA1 Message Date
Eric Huss
845ec5df7a Remove docs on --extern metadata precedence. 2019-11-07 06:43:07 -08:00
Eric Huss
f9e4f0f494 Add test for --extern alloc=librustc.rlib 2019-11-07 06:43:07 -08:00
Eric Huss
41e051dfcc Update src/test/ui-fulldeps/pathless-extern-unstable.rs
Add ERROR

Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-11-07 06:43:07 -08:00
Eric Huss
b54e8ecc2e Update extern linking documentation. 2019-11-07 06:43:07 -08:00
Ohad Ravid
3e0759dc05
Push re_rebalance_coherence to 1.41
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-11-07 15:20:56 +01:00
Eric Huss
4bf411ea6d Update built-in help for --extern. 2019-11-07 05:51:17 -08:00
Eric Huss
e0058ce994 Add more --extern tests. 2019-11-07 05:51:17 -08:00
Eric Huss
b47e3d8fe4 Stabilize --extern flag without a path. 2019-11-07 05:51:17 -08:00
Mazdak Farrokhzad
333899a736
Rollup merge of #66182 - RalfJung:invalid-value, r=Centril
invalid_value lint: fix help text

Now that we also warn about `MaybUninit::uninit().assume_init()`, just telling people "use `MaybeUninit`" isn't always sufficient. And anyway this seems like an important enough point to mention it here.
2019-11-07 14:27:26 +01:00
Mazdak Farrokhzad
a96811ee9c
Rollup merge of #66087 - tmiasko:ui-mode, r=Centril
Update some build-pass ui tests to use check-pass where applicable

Helps with issue https://github.com/rust-lang/rust/issues/62277.
2019-11-07 14:27:24 +01:00
Mazdak Farrokhzad
28c1136970
Rollup merge of #65916 - Centril:split-syntax-3, r=davidtwco
syntax: move stuff around

Part of https://github.com/rust-lang/rust/pull/65324.

r? @davidtwco
cc @estebank @petrochenkov
2019-11-07 14:27:23 +01:00
Mazdak Farrokhzad
59e79ff137
Rollup merge of #64696 - GuillaumeGomez:rustdoc-sub-settings, r=kinnison
[rustdoc] add sub settings

This PR is to give a finer control over what types are automatically expanded or not as well as the possibility to add sub-settings in the settings page.

![Screenshot from 2019-09-23 00-46-14](https://user-images.githubusercontent.com/3050060/65395521-15aff300-dd9c-11e9-9437-429ca347d455.png)

r? @Mark-Simulacrum
2019-11-07 14:27:21 +01:00
Mazdak Farrokhzad
379b19c17f
Rollup merge of #63793 - oli-obk:🧹, r=dtolnay
Have tidy ensure that we document all `unsafe` blocks in libcore

cc @rust-lang/libs

I documented a few and added ignore flags on the other files. We can incrementally document the files, but won't regress any files this way.
2019-11-07 14:27:20 +01:00
Mazdak Farrokhzad
cc9c139694 move syntax::{parse::literal -> util::literal} 2019-11-07 13:59:13 +01:00
Mazdak Farrokhzad
27f97aa468 move syntax::parse::lexer::comments -> syntax::util::comments 2019-11-07 13:59:13 +01:00
Mazdak Farrokhzad
a1571b6855 syntax::attr: remove usage of lexer 2019-11-07 13:59:13 +01:00
Mazdak Farrokhzad
255b12a8d3 move parse::classify -> util::classify 2019-11-07 13:59:13 +01:00
Mazdak Farrokhzad
3667e6248e move PResult to librustc_errors 2019-11-07 13:58:36 +01:00
Mazdak Farrokhzad
9d6768a478 syntax::parser::token -> syntax::token 2019-11-07 13:50:12 +01:00
Mazdak Farrokhzad
53a50d4e4f move unescape_error_reporting to lexer/ 2019-11-07 13:50:12 +01:00
Mazdak Farrokhzad
8fa8e02c28 syntax: simplify imports 2019-11-07 13:50:12 +01:00
Mazdak Farrokhzad
da116223c7 move parse/parser.rs -> parse/parser/mod.rs 2019-11-07 13:50:12 +01:00
Guillaume Gomez
ffc1c5a04d Update ui tests 2019-11-07 13:02:34 +01:00
Guillaume Gomez
b7c0e464d5 Add long error explanation for E0623 2019-11-07 13:01:53 +01:00
Simon Sapin
639c4f779c MaybeUninit::uninit_array docs: better example 2019-11-07 12:05:01 +01:00
Simon Sapin
05c14bcc31 Apply docs suggestions from review
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-11-07 12:05:01 +01:00
Simon Sapin
1906c6f714 Add MaybeUninit methods uninit_array, slice_get_ref, slice_get_mut 2019-11-07 12:05:00 +01:00
Guillaume Gomez
d4527b7e00 Only call onHashChange instead of both functions 2019-11-07 10:39:53 +01:00
Ralf Jung
a5be03654c invalid_value lint: fix help text 2019-11-07 10:22:50 +01:00
Guillaume Gomez
24e093c5c3 Remove old isHidden function 2019-11-07 10:13:44 +01:00
bors
50f8aadd74 Auto merge of #66180 - Centril:rollup-c1ji943, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #59789 (Revert two unapproved changes to rustc_typeck.)
 - #65752 (Use structured suggestions for missing associated items)
 - #65884 (syntax: ABI-oblivious grammar)
 - #65974 (A scheme for more macro-matcher friendly pre-expansion gating)
 - #66017 (Add future incompatibility lint for `array.into_iter()`)

Failed merges:

 - #66056 (rustc_metadata: Some reorganization of the module structure)

r? @ghost
2019-11-07 07:55:39 +00:00
Mazdak Farrokhzad
c9eae9ea63
Rollup merge of #66017 - LukasKalbertodt:array-into-iter-lint, r=matthewjasper
Add future incompatibility lint for `array.into_iter()`

This is for #65819. This lint warns when calling `into_iter` on an array directly. That's because today the method call resolves to `<&[T] as IntoIterator>::into_iter` but that would change when adding `IntoIterator` impls for arrays. This problem is discussed in detail in #65819.

We still haven't decided how to proceed exactly, but it seems like adding a lint is a good idea regardless?

Also: this is the first time I implement a lint, so there are probably a lot of things I can improve. I used a different strategy than @scottmcm describes [here](https://github.com/rust-lang/rust/pull/65819#issuecomment-548667847) since I already started implementing this before they commented.

### TODO

- [x] Decide if we want this lint -> apparently [we want](https://github.com/rust-lang/rust/pull/65819#issuecomment-548964818)
- [x] Open a lint-tracking-issue and add the correct issue number in the code -> https://github.com/rust-lang/rust/issues/66145
2019-11-07 08:51:58 +01:00
Mazdak Farrokhzad
e19cb40fda
Rollup merge of #65974 - Centril:matcher-friendly-gating, r=petrochenkov
A scheme for more macro-matcher friendly pre-expansion gating

Pre-expansion gating will now avoid gating macro matchers that did not result in `Success(...)`. That is, the following is now OK despite `box 42` being a valid `expr` and that form being pre-expansion gated:

```rust
macro_rules! m {
    ($e:expr) => { 0 }; // This fails on the input below due to `, foo`.
    (box $e:expr, foo) => { 1 }; // Successful matcher, we should get `2`.
}

fn main() {
    assert_eq!(1, m!(box 42, foo));
}
```

Closes https://github.com/rust-lang/rust/issues/65846.

r? @petrochenkov
cc @Mark-Simulacrum
2019-11-07 08:51:57 +01:00
Mazdak Farrokhzad
883fe10da2
Rollup merge of #65884 - Centril:non-hardcoded-abis, r=petrochenkov
syntax: ABI-oblivious grammar

This PR has the following effects:

1. `extern $lit` is now legal where `$lit:literal` and `$lit` is substituted for a string literal.

2. `extern "abi_that_does_not_exist"` is now *syntactically* legal whereas before, the set of ABI strings was hard-coded into the grammar of the language. With this PR, the set of ABIs are instead validated and translated during lowering. That seems more appropriate.

3. `ast::FloatTy` is now distinct from `rustc_target::abi::FloatTy`. The former is used substantially more and the translation between them is only necessary in a single place.

4. As a result of 2-3, libsyntax no longer depends on librustc_target, which should improve pipe-lining somewhat.

cc @rust-lang/lang -- the points 1-2 slightly change the definition of the language but in a way which seems consistent with our general principles (in particular wrt. the discussions of turning things into semantic errors). I expect this to be uncontroversial but it's worth letting y'all know. :)

r? @varkor
2019-11-07 08:51:55 +01:00
Mazdak Farrokhzad
a3c8572b54
Rollup merge of #65752 - estebank:sugg, r=Centril
Use structured suggestions for missing associated items

When encountering an `impl` that is missing associated items required by its `trait`, use structured suggestions at an appropriate place in the `impl`.
2019-11-07 08:51:54 +01:00
Mazdak Farrokhzad
d7f1406378
Rollup merge of #59789 - eddyb:typeck-reverts, r=nikomatsakis
Revert two unapproved changes to rustc_typeck.

There was a breakdown in process (https://github.com/rust-lang/rust/pull/59004#issuecomment-477600735, https://github.com/rust-lang/rust/pull/58894#discussion_r272795560) and two changes were made to `rustc_typeck`'s "collect" queries, for rustdoc, that were neither needed *nor* correct.
I'm reverting them here, and will fix up rustdoc *somehow*, if necessary.

cc @rust-lang/compiler How do we ensure this doesn't happen again?

r? @nikomatsakis or @oli-obk
2019-11-07 08:51:52 +01:00
Tomasz Miąsko
e88db92148 Use -Zsave-analysis when compiling issue-37323.rs 2019-11-07 08:45:57 +01:00
Mazdak Farrokhzad
55f76cdb2f syntax: use distinct FloatTy from rustc_target.
We also sever syntax's dependency on rustc_target as a result.
This should slightly improve pipe-lining.

Moreover, some cleanup is done in related code.
2019-11-07 05:25:31 +01:00
Mazdak Farrokhzad
bffc3d8073 test that extern lits accept raw strings annd escapes 2019-11-07 05:25:31 +01:00
Mazdak Farrokhzad
b189dfe507 test that parser is oblivious to set of ABIs 2019-11-07 05:25:31 +01:00
Mazdak Farrokhzad
1db4d607e7 parser: allow ABIs from literal macro fragments 2019-11-07 05:25:31 +01:00
Mazdak Farrokhzad
49def0769c cleanup can_begin_const_arg 2019-11-07 05:25:31 +01:00
Mazdak Farrokhzad
beddf67a4b parser: don't hardcode ABIs into grammar 2019-11-07 05:25:31 +01:00
bors
7a76fe76f7 Auto merge of #66175 - JohnTitor:rollup-ihqk5vn, r=JohnTitor
Rollup of 12 pull requests

Successful merges:

 - #65794 (gate rustc_on_unimplemented under rustc_attrs)
 - #65945 (Optimize long-linker-command-line test)
 - #66044 (Improve uninit/zeroed lint)
 - #66076 (HIR docs: mention how to resolve method paths)
 - #66084 (Do not require extra LLVM backends for `x.py test` to pass)
 - #66111 (improve from_raw_parts docs)
 - #66114 (Improve std:🧵:Result documentation)
 - #66117 (Fixed PhantomData markers in Arc and Rc)
 - #66146 (Remove unused parameters in `__thread_local_inner`)
 - #66147 (Miri: Refactor to_scalar_ptr out of existence)
 - #66162 (Fix broken link in README)
 - #66171 (Update link on CONTRIBUTING.md)

Failed merges:

r? @ghost
2019-11-07 03:54:25 +00:00
Umesh Kalappa
c965432e18 Ignore these tests ,since the called commands doesn't exist in VxWorks 2019-11-06 19:51:25 -08:00
Wesley Wiser
cbe2f6095a Implement pass to remove branches on uninhabited variants 2019-11-06 21:10:29 -05:00
Jeremy Fitzhardinge
446a43da0e Stabilize @file command line arguments
Issue https://github.com/rust-lang/rust/issues/63576
2019-11-06 17:31:15 -08:00
Esteban Küber
52e8ec1432 Remove "here" from "expected one of X here" 2019-11-06 17:26:20 -08:00
Yuki Okushi
b59d166006
Rollup merge of #66171 - JohnTitor:update-link, r=ehuss
Update link on CONTRIBUTING.md

This is a lost article of #66162
Follow-up for rust-lang/rustc-guide#491

CC: @mark-i-m
2019-11-07 09:20:49 +09:00
Yuki Okushi
02de841def
Rollup merge of #66162 - Darksonn:master, r=ehuss
Fix broken link in README

The link to the rustc guide on building and running the compiler is broken. It was broken in [rustc-guide#491](https://github.com/rust-lang/rustc-guide/pull/491).
2019-11-07 09:20:48 +09:00