Commit Graph

132851 Commits

Author SHA1 Message Date
Ralf Jung
ed96321e7e fix aliasing issues in u128 formatting code 2020-10-31 16:26:06 +01:00
Vadim Petrochenkov
7652bc3f68 expand: Tweak a comment in implementation of macro_rules 2020-10-31 18:13:46 +03:00
Ralf Jung
289c0d8489 Retagging: do not retag 'raw reborrows' 2020-10-31 15:31:27 +01:00
Henri Lunnikivi
7b203f3da6 Implement field_reassign_with_default
- Implement `field_reassign_with_default` as a `LateLintPass`
- Avoid triggering `default_trait_access` on a span already linted by
`field_reassigned_with_default`
- Merge `default_trait_access` and `field_reassign_with_default` into
`Default`
- Co-authored-by: Eduardo Broto <ebroto@tutanota.com>
- Fixes #568
2020-10-31 15:49:58 +02:00
Matyáš Racek
d417bbef95
Add note to process::arg[s] that args shouldn't be escaped or quoted 2020-10-31 14:40:36 +01:00
bors
e298c830af Auto merge of #6276 - dp304:patch-1, r=llogiq
Fix typo in adding_lints.md

changelog: none
2020-10-31 13:01:11 +00:00
dp304
edfa13da4a Fix typo in adding_lints.md 2020-10-31 13:31:54 +01:00
Ivan Pavluk
3baf6a4a74 Fix doc links to std::fmt
std::format and core::write macros' docs linked to core::fmt for format string reference, even though only std::fmt has format string documentation and the link titles were std::fmt.
2020-10-31 18:02:55 +07:00
bjorn3
c067be07c1 Implement -Zfunction-sections 2020-10-31 10:13:35 +01:00
bjorn3
114be422ef Rustup to rustc 1.49.0-nightly (ffe52882e 2020-10-30) 2020-10-31 10:12:51 +01:00
bors
a6b3a403ac Auto merge of #6277 - ebroto:rustup, r=ebroto
Rustup

changelog: none
2020-10-31 08:52:32 +00:00
Mara Bos
1873ca55b3
Rollup merge of #78587 - petrochenkov:lazytok, r=Aaron1011
parser: Cleanup `LazyTokenStream` and avoid some clones

by using a named struct instead of a closure.

r? @Aaron1011
2020-10-31 09:49:41 +01:00
Mara Bos
3601f9d40b
Rollup merge of #78581 - a1phyr:const_btree_more, r=dtolnay
Constantify more BTreeMap and BTreeSet functions

Just because we can:

- `BTreeMap::len`
- `BTreeMap::is_empty`
- `BTreeSet::len`
- `BTreeSet::is_empty`

Note that I put the `const` under `const_btree_new`, because I don't think their is a need to create another feature flag for that.

cc #71835
2020-10-31 09:49:39 +01:00
Mara Bos
841f0e7f2c
Rollup merge of #78577 - tmiasko:validate-aliasing, r=jonas-schievink
validator: Extend aliasing check to a call terminator
2020-10-31 09:49:38 +01:00
Mara Bos
c0f356d28f
Rollup merge of #78550 - jyn514:setup, r=Mark-Simulacrum
x.py setup: Create config.toml in the current directory, not the top-level directory

See https://github.com/rust-lang/rust/issues/78509 for discussion.

r? @pnkfelix
cc @cuviper @Mark-Simulacrum
2020-10-31 09:49:36 +01:00
Mara Bos
89aea55a7d
Rollup merge of #78526 - Aaron1011:fix/assoc-tokens, r=estebank
Strip tokens from trait and impl items before printing AST JSON

Fixes #78510
2020-10-31 09:49:34 +01:00
Mara Bos
4ebd5536b4
Rollup merge of #77099 - tspiteri:exp_m1-examples, r=m-ou-se
make exp_m1 and ln_1p examples more representative of use

With this PR, the examples for `exp_m1` would fail if `x.exp() - 1.0` is used instead of `x.exp_m1()`, and the examples for `ln_1p` would fail if `(x + 1.0).ln()` is used instead of `x.ln_1p()`.
2020-10-31 09:49:32 +01:00
Mara Bos
76b8b00b4f
Rollup merge of #74622 - fusion-engineering-forks:panic-box, r=KodrAus
Add std::panic::panic_any.

The discussion of #67984 lead to the conclusion that there should be a macro or function separate from `std::panic!()` for throwing arbitrary payloads, to make it possible to deprecate or disallow (in edition 2021) `std::panic!(arbitrary_payload)`.

Alternative names:

- `panic_with!(..)`
- ~~`start_unwind(..)`~~ (panicking doesn't always unwind)
- `throw!(..)`
- `panic_throwing!(..)`
- `panic_with_value(..)`
- `panic_value(..)`
- `panic_with(..)`
- `panic_box(..)`
- `panic(..)`

The equivalent (private, unstable) function in `libstd` is called `std::panicking::begin_panic`.

I suggest `panic_any`, because it allows for any (`Any + Send`) type.

_Tracking issue: #78500_
2020-10-31 09:49:28 +01:00
Eduardo Broto
2eb248dd16 Fix formatting 2020-10-31 09:34:01 +01:00
Eduardo Broto
9d73371663 Merge remote-tracking branch 'upstream/master' into rustup 2020-10-31 09:33:40 +01:00
Aaron Hill
6db00a213a
Update Clippy path to Lint 2020-10-30 21:41:16 -04:00
Aaron Hill
4bbc7712fc Update Clippy path to Lint 2020-10-30 21:41:16 -04:00
bors
3478d7c360 Auto merge of #76257 - JulianKnodt:i75777, r=Dylan-DPC
Add regression test

This adds a regression test for #75777, effectively closing it since it is solved on nightly and beta.

Closes #75777
2020-10-31 01:34:49 +00:00
Aaron Hill
ac12e6fd0e
Fix test 2020-10-30 20:02:15 -04:00
Aaron Hill
7b7c223827
Always pass -Z future-incompat-report to UI tests 2020-10-30 20:02:15 -04:00
Aaron Hill
2f6e59d941
Don't display empty future-compat report 2020-10-30 20:02:15 -04:00
Aaron Hill
4621ce9858
Update into-iter-on-arrays test to check future-incompat-report 2020-10-30 20:02:15 -04:00
Aaron Hill
4b4f84f327
Only error on unfixed diagnostics 2020-10-30 20:02:15 -04:00
Aaron Hill
2d17597f84
Strip out non-diagnostic lines from rustfix input 2020-10-30 20:02:15 -04:00
Aaron Hill
a77a65c029
Print future breakage report 2020-10-30 20:02:14 -04:00
Aaron Hill
6bdb4e3206
Some work 2020-10-30 20:02:14 -04:00
Aaron Hill
23018a55d9
Implement rustc side of report-future-incompat 2020-10-30 20:02:14 -04:00
Vadim Petrochenkov
d0c63bccc5 parser: Cleanup LazyTokenStream and avoid some clones
by using a named struct instead of a closure.
2020-10-31 01:56:34 +03:00
bors
0d033dee3e Auto merge of #78182 - LeSeulArtichaut:ty-visitor-contolflow, r=lcnr,oli-obk
TypeVisitor: use `std::ops::ControlFlow` instead of `bool`

Implements MCP rust-lang/compiler-team#374.

Blocked on FCP in rust-lang/compiler-team#374.
r? `@lcnr` cc `@jonas-schievink`
2020-10-30 22:53:55 +00:00
Eduardo Broto
f8ac1f99ef Address suggestions in PR review 2020-10-30 23:47:22 +01:00
Eduardo Broto
d958269fe5 Rename single_char_push_str to single_char_add_str 2020-10-30 23:29:44 +01:00
Matthias Krüger
c1eb8ceede get_hint_if_single_char_arg: fix bug where multi-char letters are not detected properly 2020-10-30 23:29:44 +01:00
Matthias Krüger
c6412aeebc handle macros returning Strings in single_char_push_str and single_char_insert_str 2020-10-30 23:29:38 +01:00
Matthias Krüger
2350ee75b2 single_char_push_str lint using insert_str() on single-char literals and suggest insert()
changelog: single_char_push_str: lint using string.insert_str() with single char literals and suggests string.insert() with a char

Fixes #6026
2020-10-30 23:28:17 +01:00
bors
084b203988 Auto merge of #6260 - matthiaskrgr:ices, r=ebroto
add a couple of ICE testcases

Fixes #6250
Fixes #6251
Fixes #6252
Fixes #6255
Fixes #6256

changelog: none
2020-10-30 22:19:11 +00:00
bors
7387b87bb9 Auto merge of #6197 - ThibsG:ImproveFilterNext, r=ebroto
Improve suggestions for several lints

This PR is a follow-up of this [Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/filter_next.20lint).

It unifies placeholders for `methods` module and improves several suggestions for `filter_next`, `filter_map_next` and `map_unwrap_or` lints.

changelog: none
2020-10-30 21:58:09 +00:00
Mike Hommey
5fb5707f35 Add LLVM upgrades from 7 to 10 to RELEASES.md
Fixes #78464
2020-10-31 06:54:39 +09:00
Michael Howell
17b8ca952b Pull theme picker keyboard code into main.js
Most of the code in mod.rs should be code that really needs to have
the list of available themes inlined into it.
2020-10-30 14:31:04 -07:00
Michael Howell
90c7c634e3 Add comment describing the Escape key weirdness 2020-10-30 13:54:36 -07:00
Michael Howell
6918a17aa4 Add aria roles for theme picker menu 2020-10-30 13:35:41 -07:00
Michael Howell
ac3a434ed9 Allow the theme picker to work with arrow keys
This is mostly motivated by docs.rs. It's really weird
when arrow keys work in the top dropdown menu, but don't work
in other dropdown menus on the same page.
2020-10-30 13:34:30 -07:00
Federico Poli
97a65b6f81 Add option to customize the nll-facts' folder location 2020-10-30 21:33:08 +01:00
Michael Howell
300362e0e4 Close the theme picker when Escape is pressed 2020-10-30 13:03:01 -07:00
Benoît du Garreau
307cc11beb Constantify more BTreeMap and BTreeSet functions
- BTreeMap::len
- BTreeMap::is_empty
- BTreeSet::len
- BTreeSet::is_empty
2020-10-30 19:24:08 +01:00
Randall Mason
9f402c991b Clarify allow/warn/deny. Remove enable/disable.
Disable and enable when not specifically explained were not clear to me
as an English language speaker, but I was able to figure it out fairly
easily due to the examples having A/W, which I assumed meant `allow` and
`warn`.  I removed both words to be sure it was clear as well as
extending the note on what deny means.  It now includes a statement on
exactly what each word means.
2020-10-30 12:16:11 -05:00