Matthias Krüger
66de34b035
Rollup merge of #102454 - chenyukang:fix-102396-missing-parentheses, r=lcnr
...
Suggest parentheses for possible range method calling
Fixes #102396
2022-10-17 17:15:49 +02:00
bors
a9d1cafa87
Auto merge of #102355 - lcnr:bye-bye-type-traversal, r=oli-obk
...
remove type traversal for mir constants
r? `@oli-obk` cc `@b-naber`
2022-10-17 14:19:28 +00:00
bors
502e87c379
Auto merge of #9637 - Alexendoo:unused-format-specs, r=xFrednet
...
Add `unused_format_specs` lint
Currently catches two cases:
An empty precision specifier:
```rust
// the same as {}
println!("{:.}", x);
```
And using formatting specs on `format_args!()`:
```rust
// prints `x.`, not `x .`
println("{:5}.", format_args!("x"));
```
changelog: new lint: [`unused_format_specs`]
2022-10-17 11:51:32 +00:00
Alex Macleod
136c2cdb91
Add unused_format_specs
lint
2022-10-17 11:36:05 +00:00
bors
abd7744101
Auto merge of #103145 - matthiaskrgr:rollup-mxwsysv, r=matthiaskrgr
...
Rollup of 4 pull requests
Successful merges:
- #102962 (remote-test-server: Show command line arguments)
- #103129 (rustdoc: remove unused `.sub-logo-container` DOM on non-source pages)
- #103136 (Fix types in documentation for `Alignment::as_usize` and `Alignmnet::as_nonzero`)
- #103139 (Duplicate comment in mod.rs)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-10-17 11:33:40 +00:00
Matthias Krüger
bb3f60b847
Rollup merge of #103139 - smoelius:patch-2, r=Dylan-DPC
...
Duplicate comment in mod.rs
2022-10-17 13:11:08 +02:00
Matthias Krüger
0c2017ff54
Rollup merge of #103136 - tmccombs:alignment-doc-fixes, r=Dylan-DPC
...
Fix types in documentation for `Alignment::as_usize` and `Alignmnet::as_nonzero`
2022-10-17 13:11:07 +02:00
Matthias Krüger
81ea72b38e
Rollup merge of #103129 - notriddle:notriddle/sub-logo-container, r=GuillaumeGomez
...
rustdoc: remove unused `.sub-logo-container` DOM on non-source pages
2022-10-17 13:11:07 +02:00
Matthias Krüger
9a615fd4e4
Rollup merge of #102962 - flba-eb:remote_test_server_help, r=pietroalbini
...
remote-test-server: Show command line arguments
The user of remote-test-server should get at least some minimal command line help as this is often started manually.
r? `@pietroalbini`
2022-10-17 13:11:07 +02:00
León Orell Valerian Liehr
684df4d24e
Make diagnostic for unsatisfied Termination bounds more precise
2022-10-17 12:08:46 +02:00
David Wood
913f597402
infer: use derive more
...
Signed-off-by: David Wood <david.wood@huawei.com>
2022-10-17 09:54:24 +01:00
David Wood
f8b628bce4
session: use derive more
...
Signed-off-by: David Wood <david.wood@huawei.com>
2022-10-17 09:54:24 +01:00
David Wood
21d3bbd8b6
lint: use derive more
...
Signed-off-by: David Wood <david.wood@huawei.com>
2022-10-17 09:54:24 +01:00
David Wood
ea5d258a75
ast_passes: use derive more
...
Signed-off-by: David Wood <david.wood@huawei.com>
2022-10-17 09:54:24 +01:00
David Wood
2a4b587a68
ast_lowering: use derive more
...
Signed-off-by: David Wood <david.wood@huawei.com>
2022-10-17 09:54:24 +01:00
David Wood
feeeb11d89
macros: fully specify path to Fn
...
Signed-off-by: David Wood <david.wood@huawei.com>
2022-10-17 09:54:24 +01:00
David Wood
1045e69e73
macros: allow subdiagnostic-kind-less variants
...
Sometimes it is convenient to return a subdiagnostic enum where one or
more of the variants don't add anything to the diagnostic.
Signed-off-by: David Wood <david.wood@huawei.com>
2022-10-17 09:54:24 +01:00
David Wood
7fbaf27696
macros: support doc comments in diag derives
...
Documentation comments shouldn't affect the diagnostic derive in any
way, but explicit support has to be added for ignoring the `doc`
attribute.
Signed-off-by: David Wood <david.wood@huawei.com>
2022-10-17 09:54:24 +01:00
lcnr
d04bff6583
add inline to TrivialTypeTraversalImpls
2022-10-17 10:54:03 +02:00
lcnr
face090ef1
rm try_normalize_mir_const_after_erasing_regions
2022-10-17 10:54:03 +02:00
lcnr
e8150fa60c
mir constants: type traversing bye bye
2022-10-17 10:54:01 +02:00
lcnr
a5e116e95f
order_dependent_trait_objects
to ReportNow
2022-10-17 10:04:54 +02:00
bors
c19a893f87
Auto merge of #103116 - TaKO8Ki:fix-103053, r=lcnr
...
Fix `own_substs` ICE
Fixes #103053
2022-10-17 08:04:52 +00:00
Samuel Moelius
bf3a29f590
Duplicate comment in mod.rs
2022-10-17 03:54:56 -04:00
David Tolnay
0bb6eb1526
Eliminate 280-byte memset from ReadDir iterator
2022-10-16 23:43:35 -07:00
Thayne McCombs
63a7fdf61b
Fix types in documentation for Alignment::as_usize and Alignmnet::as_nonzero
2022-10-16 23:44:06 -06:00
bors
1536ab1b38
Auto merge of #103096 - petrochenkov:indresdoc, r=cjgillot
...
resolve: Shadow erroneous glob imports with erroneous single imports
If such shadowing doesn't happen we end up in a weird state that may cause ICEs.
(In non-erroneous cases single imports always shadow glob imports too.)
Fixes https://github.com/rust-lang/rust/issues/100047
Fixes https://github.com/rust-lang/rust/issues/100241
2022-10-17 02:06:25 +00:00
Michael Howell
bcf4cfe790
rustdoc: clean up .sub-logo-container
CSS
...
* Since it's used exclusively on source pages, no need to explicitly
select.
* No need to hide it when the sidebar is open, since it fills the whole
page.
2022-10-16 17:57:26 -07:00
Michael Howell
b979697992
rustdoc: remove unused .sub-logo-container
DOM on non-source pages
2022-10-16 17:57:26 -07:00
Alex Saveau
1a1ebb080f
Make transpose const and inline
...
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2022-10-16 17:51:38 -07:00
bors
4eaf543b69
Auto merge of #9609 - kraktus:hexa_f32, r=giraffate
...
[`unnecessary_cast`] Do not lint negative hexadecimal literals when cast as floats
fix https://github.com/rust-lang/rust-clippy/issues/9603
changelog: [`unnecessary_cast`] Do not lint negative hexadecimal literals when cast as floats
2022-10-17 00:46:36 +00:00
yukang
151001c1cb
trivial fix for comments feedback
2022-10-17 08:32:08 +08:00
bors
a501e6699e
Auto merge of #103125 - matthiaskrgr:rollup-82xttcl, r=matthiaskrgr
...
Rollup of 5 pull requests
Successful merges:
- #103087 (Documentation BTreeMap::append's behavior for already existing keys)
- #103089 (Mark derived StructuralEq as automatically derived.)
- #103102 (Clarify the possible return values of `len_utf16`)
- #103109 (PhantomData: inline a macro that is used only once)
- #103120 (rustdoc: Do not expect `doc(primitive)` modules to always exist)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-10-16 23:15:20 +00:00
Nathan Whitaker
3041bc9e71
Don't consider Let
exprs terminating scopes
2022-10-16 15:13:01 -07:00
bors
34142fdef1
Auto merge of #9652 - kraktus:octo_89, r=xFrednet
...
[`zero_prefixed_literal`] Do not advise to use octal form if not possible
fix https://github.com/rust-lang/rust-clippy/issues/9651
changelog: [`zero_prefixed_literal`] Do not advise to use octal form if not possible
2022-10-16 21:18:54 +00:00
Matthias Krüger
db30a25781
Rollup merge of #103120 - petrochenkov:docice, r=GuillaumeGomez
...
rustdoc: Do not expect `doc(primitive)` modules to always exist
The second commit fixes one more ICE by processing impls in crates loaded through the "load all `--extern`s" hack.
Fixes https://github.com/rust-lang/rust/issues/96288
Fixes https://github.com/rust-lang/rust/issues/103028
2022-10-16 22:36:07 +02:00
Matthias Krüger
0602d6484b
Rollup merge of #103109 - RalfJung:phantom-data-impl, r=thomcc
...
PhantomData: inline a macro that is used only once
I suspect this macro used to have more uses, but right now it just obfuscates the code.
2022-10-16 22:36:06 +02:00
Matthias Krüger
bdfc262742
Rollup merge of #103102 - H4x5:len_utf16_docs, r=scottmcm
...
Clarify the possible return values of `len_utf16`
`char::len_utf16` always return 1 or 2. Clarify this in the docs, in the same way as `char::len_utf8`.
2022-10-16 22:36:06 +02:00
Matthias Krüger
2c0bfbed43
Rollup merge of #103089 - cjgillot:automatic-structural-eq, r=oli-obk
...
Mark derived StructuralEq as automatically derived.
Fixes https://github.com/rust-lang/rust/issues/69952
Drive-by: use correct spans for generic params.
2022-10-16 22:36:05 +02:00
Matthias Krüger
e31ae4f9c0
Rollup merge of #103087 - phimuemue:btreemap_append_doc, r=Mark-Simulacrum
...
Documentation BTreeMap::append's behavior for already existing keys
`BTreeMap::append` overwrites existing values with new ones. This commit adds explicit documentation for that.
2022-10-16 22:36:05 +02:00
bors
b8b5caee04
Auto merge of #102026 - Bryanskiy:resolve_update, r=petrochenkov
...
Populate effective visibilities in 'rustc_resolve'
Next part of RFC https://github.com/rust-lang/rust/issues/48054 .
previous: https://github.com/rust-lang/rust/pull/101713
`@rustbot` author
r? `@petrochenkov`
2022-10-16 20:34:38 +00:00
Alex Saveau
727335878d
Support DirEntry metadata calls in miri
...
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2022-10-16 12:14:27 -07:00
Bryanskiy
496ccd982c
Populate effective visibilities in 'rustc_resolve'
2022-10-16 21:47:14 +03:00
Vadim Petrochenkov
dd7411d848
rustdoc: Process extern impls in all loaded crates
...
including those loaded through hacks.
2022-10-16 21:55:55 +04:00
bors
bf286a82e2
Auto merge of #103119 - matthiaskrgr:rollup-2vb8hif, r=matthiaskrgr
...
Rollup of 4 pull requests
Successful merges:
- #102857 (Add a regression test for #39137 )
- #102953 (Improve docs for `struct_lint_level` function.)
- #103060 (rustdoc: make the help button a link to a page)
- #103115 (Clean up anchors.goml rustdoc GUI test)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-10-16 17:54:02 +00:00
bors
0531aab522
Auto merge of #13397 - zyctree:zyctree-patch-2, r=lnicola
...
fix link in syntax.md
2022-10-16 17:40:21 +00:00
zyctree
ea8b62f9b0
update link in syntax.md
2022-10-17 01:39:19 +08:00
Vadim Petrochenkov
c65f3db2d9
rustdoc: Do not expect doc(primitive)
modules to always exist
2022-10-16 20:44:50 +04:00
Matthias Krüger
ae717c7f2a
Rollup merge of #103115 - GuillaumeGomez:clean-up-anchors-gui-test, r=notriddle
...
Clean up anchors.goml rustdoc GUI test
r? ``@notriddle``
2022-10-16 17:51:32 +02:00
Matthias Krüger
0bd24c5dc5
Rollup merge of #103060 - notriddle:notridddle/help-page, r=GuillaumeGomez
...
rustdoc: make the help button a link to a page
This allows you to open the help section in a new browser tab, which is a pretty reasonable thing to want for a documentation page.
Preview: http://notriddle.com/notriddle-rustdoc-demos/help-page/std/index.html
2022-10-16 17:51:31 +02:00