Commit Graph

84920 Commits

Author SHA1 Message Date
Jorge Aparicio
aeea992fa2 alloc: fix deprecated warnings 2018-10-09 08:58:01 +02:00
Paweł Romanowski
1f7dafbb77 Fix test for windows os 2018-10-09 08:24:29 +02:00
mandeep
1e584bf5c9 Refactor macro comment and add resize with zeros example 2018-10-09 01:51:22 -04:00
Matthew Russo
344747330c parse_trait_item_ now handles interpolated blocks as function body decls 2018-10-08 22:50:34 -04:00
Niko Matsakis
ccba716099 add some debug! to type checking 2018-10-08 19:21:22 -04:00
Niko Matsakis
16e1aaf09d document create_substs_for_generic_args 2018-10-08 19:20:37 -04:00
Niko Matsakis
40ab41fd18 add pattern type ascriptions for tuple/brace structs/enums 2018-10-08 19:20:37 -04:00
Niko Matsakis
a609384561 do not skip renumbering the place in place-type-ascriptions 2018-10-08 19:20:37 -04:00
Niko Matsakis
71fed065f7 extract more helper fns around user substs 2018-10-08 19:20:37 -04:00
Niko Matsakis
f4b711516d move user_annotated_ty_for_adt into a helper trait 2018-10-08 19:20:37 -04:00
bors
b1a137d015 Auto merge of #54686 - zackmdavis:zero_life, r=nikomatsakis
structured suggestions for unused-lifetimes lint

Regretfully, resolve_lifetime.rs is suffering from a bit of rightward-drift, but

![zero_life](https://user-images.githubusercontent.com/1076988/46253407-010e7880-c430-11e8-8faf-b9afc1405415.png)

r? @nikomatsakis
2018-10-08 22:06:52 +00:00
varkor
be8896109a Fix handling of #[must_use] on unit and uninhabited types 2018-10-08 23:01:42 +01:00
ljedrz
a0fc2e6ddc codegen_llvm: remove explicit returns 2018-10-08 19:17:25 +02:00
ljedrz
b168e5f125 codegen_llvm: fix spelling & grammatical errors 2018-10-08 19:17:24 +02:00
ljedrz
0af79143ae codegen_llvm: improve common patterns 2018-10-08 19:17:24 +02:00
Tom Tromey
ac33b2e578 Run debuginfo tests against rust-enabled lldb, when possible
If the rust-enabled lldb was built, then use it when running the
debuginfo tests.  Updating the lldb submodule was necessary as this
needed a way to differentiate the rust-enabled lldb, so I added a line
to the --version output.

This adds compiletest commands to differentiate between the
rust-enabled and non-rust-enabled lldb, as is already done for gdb.  A
new "rust-lldb" header directive is also added, but not used in this
patch; I plan to use it in #54004.

This updates all the tests.
2018-10-08 11:04:24 -06:00
Paweł Romanowski
882e373275 Attempt to fix #54505 tests for wasm 2018-10-08 18:39:09 +02:00
Ralf Jung
54a3583da7 it's auto traits that make for automatic implementations 2018-10-08 17:44:33 +02:00
ljedrz
cd41765851 codegen_llvm: improve allocations 2018-10-08 16:55:04 +02:00
ljedrz
61f47737b5 codegen_llvm: whitespace & formatting improvements 2018-10-08 16:52:34 +02:00
Felix S. Klock II
40e20e288d Added text explaining the (new) relative roles of optimize+debug
and to briefly touch on the theory of debugging rustc versus the
practice of such.
2018-10-08 15:43:53 +02:00
scalexm
282559cff6 Compute flags for ty::UnnormalizedProjection 2018-10-08 15:26:22 +02:00
scalexm
96ff827395 Add chalk rules related to associated type defs
* Rule ProjectionEq-Skolemize
* Rule WellFormed-AssocTy
* Rule Implied-Trait-From-AssocTy
2018-10-08 15:26:22 +02:00
bors
423d810986 Auto merge of #54871 - u32i64:master, r=frewsxcv
Remove unnecessary comma in `libstd/thread/mod.rs` doc comment

Fix typo in `libstd/thread/mod.rs` doc comment: remove unnecessary comma.
2018-10-08 12:17:36 +00:00
scalexm
663002f222 Pass around interned refs to goals and not goals 2018-10-08 12:55:18 +02:00
David Wood
9e49ac067f
Change from label to suggestion.
This commit changes the label to a maybe incorrect suggestion for better
integration with RLS.
2018-10-08 12:26:56 +02:00
David Wood
f8c1b0cd5b
Add struct field suggestions.
This commit adds suggestions to change the definitions of fields in
struct definitions from immutable references to mutable references.
2018-10-08 12:26:55 +02:00
David Wood
fe8ace8da3
Move errors specify "dereference of raw pointer".
Previously, move errors involving the dereference of a raw pointer would
say "borrowed content". This commit changes it to say "dereference of
raw pointer".
2018-10-08 12:23:50 +02:00
bors
96734ae0d4 Auto merge of #54865 - pietroalbini:1.29.2-notes, r=pietroalbini
Backport 1.29.2 release notes to master

r? @ghost
2018-10-08 09:29:59 +00:00
Clément Renault
c232ea1276 Bump the Option::replace stabilize version to 1.31.0 2018-10-08 10:18:43 +02:00
Clément Renault
8c01c225ce Stabilize the Option::replace method 2018-10-08 10:06:45 +02:00
bors
25a75a4d86 Auto merge of #54847 - ljedrz:kill_graphviz_intocow, r=pnkfelix
Cleanup: remove graphviz::IntoCow

It's just `Into<Cow<...>>` and the applicable methods already exist for `Vec`/`[T]` and `String`/`str`.
2018-10-08 06:50:25 +00:00
Havvy (Ryan Scheel)
bbe832d570 cfg-attr-multi: Change issue number to actual tracking issue 2018-10-07 21:48:28 -07:00
bors
ef5c00d0ca Auto merge of #54700 - frewsxcv:frewsxcv-binary-search, r=GuillaumeGomez
Clarify docs for when binary_search has many matches.

Fixes https://github.com/rust-lang/rust/issues/51817.
2018-10-08 03:04:50 +00:00
Zack M. Davis
efd7a31150 in which rightward drift is opposed
Thanks to reviewers Tyler Mandry (for pointing out that this is
ridiculous and we need a helper function), Niko Matsakis (for pointing
out that the span-calculation code only has a couple free variables),
and Esteban Küber (for pointing out `get_generics`).
2018-10-07 19:46:19 -07:00
Zack M. Davis
b1b684ef23 structured suggestions for unused-lifetimes lint 2018-10-07 19:17:39 -07:00
bors
aefe9b099a Auto merge of #54609 - kzys:404-search, r=GuillaumeGomez
Add the library search box on the 404 page

It actually has a link to search already, but it would be better to
have the search "box" as like index.md to be consistent.

<style> can be shared with index.md, but these pages currently
use https://doc.rust-lang.org/rust.css directly.

Fixes #14572.
2018-10-08 00:33:19 +00:00
bors
b9adc3327e Auto merge of #53517 - phungleson:fix-impl-from-for-error, r=frewsxcv
Add doc for impl From for Error

As part of issue #51430 (cc @skade).

The impl is very simple, let me know if we need to go into any details.
2018-10-07 22:00:04 +00:00
bors
b2d6ea98b0 Auto merge of #54810 - 1aim:unused-impl-trait, r=oli-obk
Fix dead code lint for functions using impl Trait

Fixes https://github.com/rust-lang/rust/issues/54754

This is a minimal fix that doesn't add any new queries or touches unnecessary code. Please nominate for beta backport if wanted.
2018-10-07 19:30:24 +00:00
David Wood
72911fbbd0
Update logic to search for casts.
This commit updates the captured trait object search logic to look for
unsized casts to boxed types rather than for functions that returned
trait objects.
2018-10-07 16:14:22 +02:00
David Wood
91b71f5e94
Identify borrows captured by trait objects.
This commit enhances `LaterUseKind` detection to identify when a borrow
is captured by a trait object which helps explain why there is a borrow
error.
2018-10-07 16:03:06 +02:00
bors
0ee045ea09 Auto merge of #54835 - oli-obk:mögen_konstante_funktionen_doch_bitte_endlich_stabil_sein, r=Centril
Stabilize `min_const_fn`

tracking issue: #53555

r? @Centril
2018-10-07 13:37:07 +00:00
Corey Farwell
b5c64e2e26 Clarify docs for when binary_search has many matches.
Fixes https://github.com/rust-lang/rust/issues/51817.
2018-10-07 08:46:22 -04:00
Donato Sciarra
b7248d5988 Fix internal compiler error on malformed match arm pattern.
Issue: 54379
2018-10-07 13:14:21 +02:00
bors
5a6f122126 Auto merge of #54813 - petrochenkov:uilocale, r=alexcrichton
Fix two UI tests with locale-dependent output

Closes https://github.com/rust-lang/rust/issues/54719
2018-10-07 11:10:39 +00:00
Simon Sapin
9a9894a8f1
Fix tracking issue for Once::is_completed 2018-10-07 12:00:41 +02:00
Havvy (Ryan Scheel)
35e6c65628 cfg_attr_multi: Feature gate 2018-10-07 02:08:24 -07:00
bors
987a50bab3 Auto merge of #54823 - euclio:needs-test, r=alexcrichton
Add tests for some E-needstest issues

Fixes #28134.
Fixes #24338.
Fixes #29743.
2018-10-07 08:32:19 +00:00
bors
13429136b8 Auto merge of #54451 - alexcrichton:no-mangle-extern-linkage, r=michaelwoerister
rustc: Allow `#[no_mangle]` anywhere in a crate

This commit updates the compiler to allow the `#[no_mangle]` (and
`#[export_name]` attributes) to be located anywhere within a crate.
These attributes are unconditionally processed, causing the compiler to
always generate an exported symbol with the appropriate name.

After some discussion on #54135 it was found that not a great reason
this hasn't been allowed already, and it seems to match the behavior
that many expect! Previously the compiler would only export a
`#[no_mangle]` symbol if it were *publicly reachable*, meaning that it
itself is `pub` and it's otherwise publicly reachable from the root of
the crate. This new definition is that `#[no_mangle]` *is always
reachable*, no matter where it is in a crate or whether it has `pub` or
not.

This should make it much easier to declare an exported symbol with a
known and unique name, even when it's an internal implementation detail
of the crate itself. Note that these symbols will persist beyond LTO as
well, always making their way to the linker.

Along the way this commit removes the `private_no_mangle_functions` lint
(also for statics) as there's no longer any need to lint these
situations. Furthermore a good number of tests were updated now that
symbol visibility has been changed.

Closes #54135
2018-10-07 03:07:16 +00:00
bors
dbecb7a644 Auto merge of #54782 - pnkfelix:issue-54556-semi-on-tail-diagnostic, r=nikomatsakis
NLL: temps in block tail expression diagnostic

This change adds a diagnostic that explains when temporaries in a block tail expression live longer than block local variables that they borrow, and attempts to suggest turning the tail expresion into a statement (either by adding a semicolon at the end, when its result value is clearly unused, or by introducing a `let`-binding for the result value and then returning that).

Fix #54556
2018-10-07 00:28:26 +00:00