about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2020-03-11Format the match statementLena Wildervanck-3/+6
2020-03-10Remove deprecated description function of TryReserveErrorLena Wildervanck-5/+1
2020-03-07Implement Error for TryReserveErrorLena Wildervanck-0/+24
2020-03-06Auto merge of #69586 - petrochenkov:unmerge, r=Centrilbors-133/+183
ast: Unmerge structures for associated items and foreign items Follow-up to https://github.com/rust-lang/rust/pull/69194. r? @Centril
2020-03-05Auto merge of #69746 - Dylan-DPC:rollup-wr6dvdk, r=Dylan-DPCbors-129/+128
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-05Rollup merge of #69742 - TrolledWoods:patch-1, r=jonas-schievinkDylan DPC-1/+1
Fixed a typo "vector" was used instead of "string". I think this is a typo?
2020-03-05Rollup merge of #69736 - matthiaskrgr:even_more_clippy, r=Dylan-DPCDylan DPC-60/+56
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-05Rollup merge of #69732 - GuillaumeGomez:cleanup-e0382-e0384, r=Dylan-DPCDylan DPC-3/+2
Clean E0382 and E0384 explanations r? @Dylan-DPC
2020-03-05Rollup merge of #69728 - LeSeulArtichaut:patch-1, r=steveklabnikDylan DPC-1/+3
Make link to `std::str` active Closes #69726. r? @dtolnay
2020-03-05Rollup merge of #69713 - matthiaskrgr:more_cleanup, r=cramertjDylan DPC-38/+32
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-05Rollup merge of #69711 - penelopezone:patch-1, r=steveklabnikDylan DPC-1/+1
Update macros.rs: fix documentation typo.
2020-03-05Rollup merge of #69698 - RalfJung:int_assoc, r=davidtwcoDylan DPC-23/+21
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-05Rollup merge of #69697 - GuillaumeGomez:explanation-e0380, r=Dylan-DPCDylan DPC-2/+12
Add explanation for E0380 r? @Dylan-DPC
2020-03-05Fixed a typoTrolledWoods-1/+1
"vector" was used instead of "string"
2020-03-05Auto merge of #67260 - TheSamsa:const-limit, r=oli-obkbors-34/+163
const limit for CTFE I tried to tackle the first steps for this issue. The active feature flag does link to the issue below, I think this has to change, because there should be a tracking issue? https://github.com/TheSamsa/rust/blob/1679a7647da0de672bac26b716db82d16f3896a8/src/librustc_feature/active.rs#L530 Also, I only put up the storage of the limit like "recursion_limit" but created a seperate file in the same place. Since I guess the invocation happens seperately. https://github.com/TheSamsa/rust/blob/const-limit/src/librustc/middle/const_limit.rs If this does not hold up for the issue and since there is a time pressure, just reject it. hopefully this does not put more load on you than I expected...
2020-03-05Don't pass &mut where immutable reference (&) is sufficient ↵Matthias Krüger-7/+7
(clippy::unnecessary_mut_passed)
2020-03-05Use more efficient &&str to String conversion (clippy::inefficient_to_string)Matthias Krüger-7/+8
2020-03-05Don't always eval arguments inside .expect(), use unwrap_or_else and ↵Matthias Krüger-7/+7
closure. (clippy::expect_fun_call)
2020-03-05Use righthand '&' instead of lefthand "ref". (clippy::toplevel_ref_arg)Matthias Krüger-13/+13
2020-03-05Use simple 'for i in x' loops instead of 'while let Some(x) = x.next()' ↵Matthias Krüger-9/+4
loops on iterators. (clippy::while_let_on_iterator)
2020-03-05Const items have by default a static lifetime, there's no need to annotate ↵Matthias Krüger-14/+14
it. (clippy::redundant_static_lifetimes)
2020-03-05Remove redundant patterns when matching ( x @ _ to x) ↵Matthias Krüger-3/+3
(clippy::redundant_pattern)
2020-03-05Auto merge of #69692 - matthiaskrgr:submodule_upd, r=oli-obkbors-7/+11
submodules: update clippy from 8b7f7e66 to 74eae9dc Changes: ```` Rustup to rust-lang/rust#69506 Revive rls integration test use question mark operator Add regression test Use `try_eval_usize` over `eval_usize` Add path for display trait Use lang items instead of get_trait_def_id where possible Update stderr Don't lint debug formatting in debug impl Whitelist unused attribute for use items. add test for #5238 ```` Makes clippy tests pass again. r? @oli-obk
2020-03-05Clean E0382 and E0384 explanationsGuillaume Gomez-3/+2
2020-03-05Make link to `std::str` activeLeSeulArtichaut-1/+3
2020-03-05Bumped version number for const_eval_limit in active.rsChristoph Schmidler-25/+47
and renamed 'recursion_limit' in limits.rs to simple 'limit' because it does handle other limits too.
2020-03-05Opt out of CTFE if the 'const_eval_limit' is set to 0Christoph Schmidler-10/+26
2020-03-05Add a new test to reach const_limit setting, although with wrong WARNINGs yetChristoph Schmidler-37/+52
rename feature to const_eval_limit
2020-03-05Disable CTFE if const_limit was set to 0, otherwise use the value set, which ↵Christoph Schmidler-8/+40
defaults to 1_000_000
2020-03-05Prepare const_limit feature gate and attributeChristoph Schmidler-1/+45
2020-03-05Auto merge of #69717 - estebank:correctly-probe, r=varkorbors-2/+1
Correctly reject `TraitCandidate` in all cases Follow up to #69255, addresses #69629. When `self.select_trait_candidate(trait_ref)` returned `Err(_)`, `result` wasn't being set to `NoMatch`, causing invalid methods to be selected.
2020-03-04Correctly reject `TraitCandidate` in all casesEsteban Küber-2/+1
Follow up to #69255, fix #69629.
2020-03-04Use single-char patter on {ends,starts}_with and remove clone on copy type.Matthias Krüger-4/+4
These were introduced since I last fixed most of these occurences. (clippy::clone_on_copy, clippy::single_char_pattern)
2020-03-04Don't use "if let" bindings to only check a value and not actually bind ↵Matthias Krüger-9/+9
anything. For example: `if let Some(_) = foo() {}` can be reduced to `if foo().is_some() {}` (clippy::redundant_pattern_matching)
2020-03-04Use .as_deref() instead of .as_ref().map(Deref::deref) ↵Matthias Krüger-2/+2
(clippy::option_as_ref_deref)
2020-03-04Use .map() to modify data inside Options instead of using .and_then(|x| ↵Matthias Krüger-22/+17
Some(y)) (clippy::option_and_then_some)
2020-03-04Don't use .ok() before unwrapping via .expect() on a Result.Matthias Krüger-1/+0
The Result can be expect-unwrapped directly. (clippy::ok_expect)
2020-03-04Update macros.rs: fix documentation typo.Penelope Phippen-1/+1
2020-03-04submodules: update clippy from 8b7f7e66 to 329923edMatthias Krüger-7/+11
Changes: ```` Apply suggestions from code review Simplify if_chain. Move NumericLiteral to its own module. Included binary and octal cases. Resolve false positives for hex int cast. Test for unnecessary_cast of hex int literal. run-rustfix Lint `if let Some` in question_mark lint Add restrictive pat use in full binded struct Update test case answers to match cargo dev fmt Ran cargo dev fmt Rustup to rust-lang/rust#69506 Recommended changes from flip1995 Revive rls integration test use question mark operator Add regression test Use `try_eval_usize` over `eval_usize` Add path for display trait Use lang items instead of get_trait_def_id where possible Update stderr Don't lint debug formatting in debug impl Whitelist unused attribute for use items. Fix one last test issue Refactor suggested by krishna-veerareddy Fixed compile error from merging Changed test output to reflect cargo fmt Run cargo dev fmt Finished checking for cases of absolute values add test for #5238 Some bugfixing Created floating point abs lint and test, but not yet run ````
2020-03-04Auto merge of #69576 - matthiaskrgr:nightly_bootstrap_from_beta, r=Centrilbors-1/+1
nightly: bootstrap from 1.42.0-beta.5 (4e1c5f0e9 2020-02-28) This beta snapshot has the llvm miscompilation fix included and is bootstrapped from a stable version that also has it included.
2020-03-04cover some more nearby casesRalf Jung-10/+8
2020-03-04use integer assoc consts instead of methodsRalf Jung-13/+13
2020-03-04Add explanation for E0380Guillaume Gomez-2/+12
2020-03-04Auto merge of #69636 - RalfJung:miri, r=nikomatsakisbors-8/+11
update miri Let's make that toolstate green again. :D This bumps serde in the lockfile, so r? @oli-obk Fixes https://github.com/rust-lang/rust/issues/69462
2020-03-04update miriRalf Jung-7/+10
2020-03-04point cargo-miri to the right xargo binaryRalf Jung-1/+1
2020-03-04Auto merge of #68952 - faern:stabilize-assoc-int-consts, r=dtolnaybors-242/+263
Stabilize assoc_int_consts associated int/float constants The next step in RFC https://github.com/rust-lang/rfcs/pull/2700 (tracking issue #68490). Stabilizing the associated constants that were added in #68325. * Stabilize all constants under the `assoc_int_consts` feature flag. * Update documentation on old constants to say they are soft-deprecated and the new ones should be preferred. * Update documentation examples to use new constants. * Remove `uint_macro` and use `int_macro` for all integer types since the macros were identical anyway. r? @LukasKalbertodt
2020-03-04Auto merge of #69550 - RalfJung:scalar, r=oli-obkbors-87/+69
interpret engine: Scalar cleanup * Remove `to_ptr` * Make `to_bits` private r? @oli-obk
2020-03-03Auto merge of #69678 - Dylan-DPC:rollup-yoaueud, r=Dylan-DPCbors-56/+100
Rollup of 6 pull requests Successful merges: - #69565 (miri engine: turn some debug_assert into assert) - #69621 (use question mark operator in a few places.) - #69650 (cleanup more iterator usages (and other things)) - #69653 (use conditions directly) - #69665 (Invoke OptimizerLastEPCallbacks in PreLinkThinLTO) - #69670 (Add explanation for E0379) Failed merges: r? @ghost
2020-03-03Rollup merge of #69670 - GuillaumeGomez:explain-e0379, r=Dylan-DPCDylan DPC-0/+12
Add explanation for E0379 r? @Dylan-DPC