Commit Graph

108199 Commits

Author SHA1 Message Date
Esteban Küber
125159f30a When encountering an Item in a pat context, point at the item def 2020-03-06 15:29:26 -08:00
Ralf Jung
295c2d69bd bug on ty::GeneratorWitness 2020-03-06 22:41:50 +01:00
Ralf Jung
58f8cc2135 rename visit_primitive -> try_visit_primitive, and comments 2020-03-06 22:41:49 +01:00
Ralf Jung
f0586f9aea please tidy 2020-03-06 22:41:49 +01:00
Ralf Jung
4584e75c9b better error messages for invalid boxes (and a few more tests) 2020-03-06 22:41:49 +01:00
Ralf Jung
f481547622 test some more kinds of enums with uninhabited variants 2020-03-06 22:41:49 +01:00
Ralf Jung
4807e939cd test that we validate boxes 2020-03-06 22:41:49 +01:00
Ralf Jung
aa1435b0ae const validation ub tests: use transmute instead of unions 2020-03-06 22:41:49 +01:00
Ralf Jung
d47196b2ec miri value visitor: detect primitives by type, not layout 2020-03-06 22:41:49 +01:00
Ralf Jung
6548be2ba9 'fieldless enums' is not what I meant -- it's empty/uninhabited enums, really 2020-03-06 22:41:49 +01:00
Santiago Pastorino
0ed6e795fb
mir::Local is Copy we can pass it by value in these cases 2020-03-06 18:23:18 -03:00
LeSeulArtichaut
33ebc20513 Turn trailing tokens in assert!() into hard errors 2020-03-06 22:02:20 +01:00
Esteban Küber
f483032e97 review comment 2020-03-06 11:58:52 -08:00
Esteban Küber
005fc6eacc Suggest removal of auto trait super traits and type params 2020-03-06 11:58:41 -08:00
Yuki Okushi
3d67649287
Add a regression test 2020-03-07 04:38:50 +09:00
Yuki Okushi
1631b4de1c
Avoid using unwrap() in suggestions 2020-03-07 04:24:13 +09:00
Esteban Küber
6fba412499 Further tweak spans in ast validation errors 2020-03-06 10:55:21 -08:00
Matthias Krüger
83980aca20 Don't redundantly repeat field names (clippy::redundant_field_names) 2020-03-06 19:42:18 +01:00
Matthias Krüger
4c2b0f1631 bless tests 2020-03-06 19:37:22 +01:00
Yuki Okushi
18080e6072
Remove NO_DEBUG const 2020-03-07 03:32:01 +09:00
bors
2890b37b86 Auto merge of #69753 - pnkfelix:issue-69191-ice-on-uninhabited-enum-field, r=oli
Do not ICE when matching an uninhabited enum's field

Fix #69191
2020-03-06 17:52:52 +00:00
Vadim Petrochenkov
2d0c5b4337 rustc_expand: Factor out Annotatable::into_tokens to a separate method 2020-03-06 20:34:01 +03:00
Lukas
31183bbd5a
Fix missing ` in doc for File::with_options 2020-03-06 14:27:09 +00:00
Matthias Krüger
136ad015b6 fix various typos 2020-03-06 15:19:31 +01:00
Stein Somers
44c97c43b5 Fix & test leak of some BTreeMap nodes on panic during into_iter 2020-03-06 14:50:09 +01:00
Guillaume Gomez
13d5ee1c4f Cleanup E0390 explanation 2020-03-06 12:52:16 +01:00
Felix S. Klock II
b4422fb14b Added oli's multivariant test case (alpha renaming the enum name itself).
(And added Ralf's suggested test.)

Added my own three-variant multi-variant as well.
2020-03-06 06:46:37 -05:00
bors
865b44a3e3 Auto merge of #69614 - estebank:ice-age, r=davidtwco
`delay_span_bug` when codegen cannot select obligation

Fix #69602, introduced in #60126 by letting the compiler continue past
type checking after encountering errors.
2020-03-06 08:24:48 +00:00
Oliver Scherer
40809b0585
Add FIXME 2020-03-06 08:48:58 +01:00
Phoebe Bell
3d146a3d1a Document unsafe blocks in core::fmt 2020-03-05 19:47:58 -08:00
Dylan Nugent
9afbf28ef6 Update deprecation version to 1.42 for Error::description
Error::description is deprecated as of version 1.42, as the commit was
not in the release for 1.41.
2020-03-05 21:55:36 -05:00
Felix S. Klock II
9712fa4059 Fix #69191 2020-03-05 21:53:26 -05:00
bors
4a1b69d53a Auto merge of #69586 - petrochenkov:unmerge, r=Centril
ast: Unmerge structures for associated items and foreign items

Follow-up to https://github.com/rust-lang/rust/pull/69194.
r? @Centril
2020-03-06 02:22:49 +00:00
Jonas Schievink
b26e27c5f3 Add test for generator sizes with resume arguments 2020-03-06 01:45:45 +01:00
Jonas Schievink
818934b9b4 Model generator resumption in dataflow
We now have a way to apply an effect only *after* a `yield` resumes,
similar to calls (which can either return or unwind).
2020-03-06 01:45:45 +01:00
Esteban Küber
713a291441 review comments 2020-03-05 15:39:35 -08:00
Ralf Jung
2770f300b1 reduce test size for Miri 2020-03-05 23:41:17 +01:00
Jonas Schievink
2070ea26e1 Move stray generator test into the generator dir 2020-03-05 23:01:57 +01:00
bors
b818ccc74c Auto merge of #69746 - Dylan-DPC:rollup-wr6dvdk, r=Dylan-DPC
Rollup of 8 pull requests

Successful merges:

 - #69697 (Add explanation for E0380)
 - #69698 (Use associated constants of integer types)
 - #69711 (Update macros.rs: fix documentation typo.)
 - #69713 (more clippy cleanups)
 - #69728 (Make link to `std::str` active)
 - #69732 (Clean E0382 and E0384 explanations)
 - #69736 (even more clippy cleanups)
 - #69742 (Fixed a typo)

Failed merges:

r? @ghost
2020-03-05 21:39:00 +00:00
Dylan DPC
80c843431d
Rollup merge of #69742 - TrolledWoods:patch-1, r=jonas-schievink
Fixed a typo

"vector" was used instead of "string". I think this is a typo?
2020-03-05 22:04:12 +01:00
Dylan DPC
67d735c4bf
Rollup merge of #69736 - matthiaskrgr:even_more_clippy, r=Dylan-DPC
even more clippy cleanups

* Don't pass &mut where immutable reference (&) is sufficient (clippy::unnecessary_mut_passed)
* Use more efficient &&str to String conversion (clippy::inefficient_to_string)
* Don't always eval arguments inside .expect(), use unwrap_or_else and closure. (clippy::expect_fun_call)
* Use righthand '&' instead of lefthand "ref". (clippy::toplevel_ref_arg)
* Use simple 'for i in x' loops instead of 'while let Some(i) = x.next()' loops on iterators. (clippy::while_let_on_iterator)
* Const items have by default a static lifetime, there's no need to annotate it. (clippy::redundant_static_lifetimes)
* Remove redundant patterns when matching ( x @ _  to  x) (clippy::redundant_pattern)
2020-03-05 22:04:10 +01:00
Dylan DPC
558115b86c
Rollup merge of #69732 - GuillaumeGomez:cleanup-e0382-e0384, r=Dylan-DPC
Clean E0382 and E0384 explanations

r? @Dylan-DPC
2020-03-05 22:04:09 +01:00
Dylan DPC
7aac135dd7
Rollup merge of #69728 - LeSeulArtichaut:patch-1, r=steveklabnik
Make link to `std::str` active

Closes #69726.

r? @dtolnay
2020-03-05 22:04:07 +01:00
Dylan DPC
22a743bc1c
Rollup merge of #69713 - matthiaskrgr:more_cleanup, r=cramertj
more clippy cleanups

* Don't use .ok() before unwrapping via .expect() on a Result.
* Use .map() to modify data inside Options instead of using .and_then(|x| Some(y))
* Use .as_deref() instead of .as_ref().map(Deref::deref)
* Don't use "if let" bindings to only check a value and not actually bind anything.
* Use single-char patter on {ends,starts}_with and remove clone on copy type.
2020-03-05 22:04:05 +01:00
Dylan DPC
189626672d
Rollup merge of #69711 - penelopezone:patch-1, r=steveklabnik
Update macros.rs: fix documentation typo.
2020-03-05 22:04:04 +01:00
Dylan DPC
44f184acc0
Rollup merge of #69698 - RalfJung:int_assoc, r=davidtwco
Use associated constants of integer types

Take advantage of https://github.com/rust-lang/rust/pull/68952 in the interpreter and some nearby modules :)
2020-03-05 22:04:02 +01:00
Dylan DPC
e01dc83aa8
Rollup merge of #69697 - GuillaumeGomez:explanation-e0380, r=Dylan-DPC
Add explanation for E0380

r? @Dylan-DPC
2020-03-05 22:03:58 +01:00
TrolledWoods
79bc934ff3
Fixed a typo
"vector" was used instead of "string"
2020-03-05 20:20:02 +01:00
Tomasz Miąsko
30650f867b debuginfo: Use is unsigned flag when emitting enumerators 2020-03-05 20:13:01 +01:00
Tomasz Miąsko
ebd941b890 debuginfo: Generators use u32 as discriminant type repr 2020-03-05 20:13:01 +01:00