Matthias Krüger
56a3da3bd0
simplify boolean expressions
2020-02-29 11:36:18 +01:00
Ralf Jung
5982e9d3ca
downgrade some assertions to debug_ again
2020-02-29 10:25:57 +01:00
Ralf Jung
a09c33e362
move pattern to fn argument
2020-02-29 09:41:59 +01:00
Ralf Jung
7c84e451d5
move panic intrinsic codegen to helper function
2020-02-29 09:40:40 +01:00
Ralf Jung
bfe593e03a
clarify a comment in the test
2020-02-29 09:29:51 +01:00
Ralf Jung
729f4cd9ae
we cannot short-circuit just becuase the Abi seems harmless
...
also add tests for ScalarPair enums
2020-02-29 09:27:25 +01:00
Ralf Jung
6e66f586a0
fmt
2020-02-29 09:27:25 +01:00
Ralf Jung
b133d6776f
make it even more conservative, and note some FIXMEs
2020-02-29 09:27:25 +01:00
Ralf Jung
df6a3a0ed2
test some more things that should not panic
2020-02-29 09:27:25 +01:00
Ralf Jung
d78c4aa62e
use valid_range_exclusive for correct overflow handling
2020-02-29 09:27:25 +01:00
Ralf Jung
6fd909b2b1
reference tracking issue
2020-02-29 09:27:25 +01:00
Ralf Jung
503026b622
mem::zeroed/uninit: panic on types that do not permit zero-initialization
2020-02-29 09:27:25 +01:00
bors
04e7f96dd8
Auto merge of #69227 - Marwes:buffer_stderr, r=varkor
...
perf: Buffer stderr when writing json errors/warnings
Since `stderr` is unbuffered, writing out json messages actually take up
about ~10%/0.1s of the runtime of the `inflate` benchmark as it generates a fair number of warnings.
cc #64413
2020-02-29 07:27:29 +00:00
Youngsuk Kim
6e265c5bc5
Remove trailing whitespace
...
Removed trailing whitespace which caused to fail pretty-check
2020-02-29 00:55:05 -05:00
Youngsuk Kim
fb46d2b82e
Update src/liballoc/vec.rs
...
Following suggestion from @jonas-schievink
Co-Authored-By: Jonas Schievink <jonasschievink@gmail.com>
2020-02-29 00:52:32 -05:00
Dylan MacKenzie
21cd1fe0bd
Process RequiresStorage
results in pre-order
...
Reverse post-order requires an allocation.
2020-02-28 21:29:21 -08:00
John Kåre Alsaker
98251d8fb2
Reduce visibility of get_module_parent_node
and remove get_module_parent
2020-02-29 05:59:58 +01:00
John Kåre Alsaker
542d813475
Add a parent_module_from_def_id
query
2020-02-29 05:59:38 +01:00
bors
55aee8d496
Auto merge of #69255 - estebank:e0599-details, r=varkor
...
Add more context to E0599 errors
Point at the intermediary unfulfilled trait bounds.
Fix #52523 , fix #61661 , cc #36513 , fix #68131 , fix #64417 , fix #61768 , cc #57457 , cc #9082 , fix #57994 , cc #64934 , cc #65149 .
2020-02-29 03:52:53 +00:00
Matthias Krüger
de7c40c168
use .iter() instead of .into_iter() on references.
2020-02-29 03:14:01 +01:00
Matthias Krüger
a8a153b1a9
don't use question mark operator on Err(), return the Result directly instead.
2020-02-29 02:48:27 +01:00
Dylan DPC
bbfec7ca41
Rollup merge of #69567 - matthiaskrgr:useless_fmt, r=nagisa
...
use .to_string() instead of format!() macro to create strings
handles what is left after https://github.com/rust-lang/rust/pull/69541
2020-02-29 02:16:24 +01:00
Dylan DPC
1bb6760968
Rollup merge of #69563 - andre-richter:fix_no_std_match, r=Mark-Simulacrum
...
Fix no_std detection for target triples
The current check for wether a target is no_std or not is matching for the string `-none-` in a target triple. This doesn't work for triples that end in `-none`, like `aarch64-unknown-none`.
Fix this by matching for `-none` instead.
I checked for all the current target triples containing `none`, and this should not generate any false positives.
This fixes an issue encountered in https://github.com/rust-lang/rust/pull/68334
2020-02-29 02:16:23 +01:00
Dylan DPC
c8db7dcc1c
Rollup merge of #69551 - matthiaskrgr:len_zero, r=Mark-Simulacrum
...
use is_empty() instead of len() == x to determine if structs are empty.
2020-02-29 02:16:21 +01:00
Dylan DPC
ba2df27525
Rollup merge of #69546 - matthiaskrgr:slice_to_vec, r=davidtwco,nagisa
...
use to_vec() instead of .iter().cloned().collect() to convert slices to vecs.
2020-02-29 02:16:20 +01:00
Dylan DPC
2774d48337
Rollup merge of #69504 - MichaelMcDonnell:hash_assert_ne, r=LukasKalbertodt
...
Use assert_ne in hash tests
The hash tests were written before the assert_ne macro was added to the standard library. The assert_ne macro provides better output in case of a failure.
2020-02-29 02:16:18 +01:00
Dylan DPC
222aa62008
Rollup merge of #69477 - Pulkit07:issue69298, r=cramertj
...
docs: add mention of async blocks in move keyword docs
Fixes #69298
2020-02-29 02:16:17 +01:00
Matthias Krüger
f55b2c9b12
remove unneeded .as_ref() calls.
2020-02-29 02:16:04 +01:00
Matthias Krüger
85e59b7664
use .to_string() instead of format!() macro to create strings
2020-02-29 01:32:42 +01:00
Youngsuk Kim
2ad52cd16d
Clarify explanation of 'fn resize'
...
1. Clarified on what should implement 'Clone' trait.
2. Minor grammar fix:
to be able clone => to be able to clone
2020-02-28 19:28:26 -05:00
bors
5703b7aafb
Auto merge of #69208 - RalfJung:debug-assert, r=Mark-Simulacrum
...
debug_assert a few more raw pointer methods
Makes progress for https://github.com/rust-lang/rust/issues/53871
2020-02-29 00:20:44 +00:00
Ralf Jung
6f568e72f3
miri engine: turn some debug_assert into assert
2020-02-28 22:54:10 +01:00
Andre Richter
7cf2bfb657
Fix no_std detection for target triples
...
The current check for wether a target is no_std or not is matching for the
string "-none-" in a target triple. This doesn't work for triples that end in
"-none", like "aarch64-unknown-none".
Fix this by matching for "-none" instead.
I checked for all the current target triples containing "none", and this should
not generate any false positives.
This fixes an issue encountered in https://github.com/rust-lang/rust/pull/68334
2020-02-28 21:51:16 +01:00
Dylan MacKenzie
52ad1e73ce
Don't bug when taking discriminant of generator
2020-02-28 12:07:20 -08:00
Esteban Küber
2fb35adc48
Ignore output for some platforms with diverging test output
...
Get around #53081 .
2020-02-28 12:01:29 -08:00
Esteban Küber
a9a99df0a2
Do not suggest implementing traits if present in predicates
2020-02-28 11:37:59 -08:00
Esteban Küber
61bc7a3462
Reword message
2020-02-28 11:37:59 -08:00
Esteban Küber
a29f6916d8
Reduce verbosity when suggesting restricting type params
2020-02-28 11:37:59 -08:00
Esteban Küber
c764a82310
keep predicate order and tweak output
2020-02-28 11:37:59 -08:00
Esteban Küber
7c29441ef2
Review comments: split requirement text to multiple lines for readability
2020-02-28 11:37:59 -08:00
Esteban Küber
01286408c1
Account for arbitrary self types in E0599
2020-02-28 11:37:59 -08:00
Esteban Küber
392d853589
Suggest constraining type parameters
2020-02-28 11:37:59 -08:00
Esteban Küber
1e7bcc733a
Tweak wording
2020-02-28 11:37:59 -08:00
Esteban Küber
0387f0d19b
Mention the full path of the implementing trait
2020-02-28 11:37:59 -08:00
Esteban Küber
89e96e9bc5
Point at closure definitions
2020-02-28 11:37:59 -08:00
Esteban Küber
9a64c3f5cb
Show information of chain of bound obligations
...
When the obligation that couldn't be fulfilled is specific to a nested
obligation, maintain both the nested and parent obligations around for
more accurate and detailed error reporting.
2020-02-28 11:37:59 -08:00
Esteban Küber
8119d0853d
Track all predicates in errors, not just trait obligations
...
Surface associated type projection bounds that could not be fulfilled in
E0599 errors. Always present the list of unfulfilled trait bounds,
regardless of whether we're pointing at the ADT or trait that didn't
satisfy it.
2020-02-28 11:37:59 -08:00
Esteban Küber
ad4777dbca
Deduplicate information in E0599
2020-02-28 11:37:59 -08:00
Esteban Küber
8993b99ae2
On single local candidate, use span label
2020-02-28 11:37:58 -08:00
Esteban Küber
5e8707f39d
Reduce vebosity of E0599
2020-02-28 11:37:58 -08:00