Commit Graph

199944 Commits

Author SHA1 Message Date
Michael Howell
b4173b6d86 rustdoc: remove redundant CSS #source-sidebar, #sidebar-toggle
These two elements are always nested below `<nav class="sidebar">`, and will
inherit the font from their parent.

These selectors were added in 93520d2ad1, and
became redundant in 07e3f998b1 when the source
sidebar elements became nested below `nav.sidebar`.
2022-09-12 21:58:35 -07:00
bors
9da4644d56 Auto merge of #100101 - BelovDV:issue-99429, r=petrochenkov
change rlib format to distinguish native dependencies

Another one method to solve problem mentioned in #99429.

Changed .rlib format, it contains all bundled native libraries as archieves.
At link time rlib is unpacked and native dependencies linked separately.
New behavior hidden under separate_native_rlib_dependencies flag.
2022-09-13 04:00:24 +00:00
Michael Goulet
cd962e66cf Don't render inline suggestions of only spaces 2022-09-13 03:52:43 +00:00
Jay3332
ba3b3bcc17
Fix typo in concat_bytes documentation
This fixes the typo `&[u8, _]` -> `&[u8; _]`
2022-09-12 21:40:28 -04:00
bors
0df1ddc185 Auto merge of #99556 - davidtwco:collapse-debuginfo, r=wesleywiser
ssa: implement `#[collapse_debuginfo]`

cc #39153 rust-lang/compiler-team#386

Debuginfo line information for macro invocations are collapsed by default - line information are replaced by the line of the outermost expansion site. Using `-Zdebug-macros` disables this behaviour.

When the `collapse_debuginfo` feature is enabled, the default behaviour is reversed so that debuginfo is not collapsed by default. In addition, the `#[collapse_debuginfo]` attribute is available and can be applied to macro definitions which will then have their line information collapsed.

r? rust-lang/wg-debugging
2022-09-13 01:19:05 +00:00
Eric Holk
de42ac3970 Move dyn* tests to their own directory 2022-09-12 17:29:24 -07:00
Eric Holk
3c2d20ef0b Make x.py check work 2022-09-12 17:29:11 -07:00
Eric Holk
ddfcca48c6 Update feature flags on dyn-star tests 2022-09-12 16:56:00 -07:00
Michael Goulet
03148ff735 Make dyn-trait-method work 2022-09-12 16:56:00 -07:00
Michael Goulet
b2ed2dcaae Rename some variants 2022-09-12 16:55:59 -07:00
Michael Goulet
12ec2f0e34 Construct dyn* during const interp 2022-09-12 16:55:59 -07:00
Michael Goulet
12353c11ca Use principal of cast target as dyn-star trait ref in codegen 2022-09-12 16:55:58 -07:00
Eric Holk
ef7062dad6 Add test to make sure we run custom destructors 2022-09-12 16:55:58 -07:00
Eric Holk
48e7f24804 Add test case for calling methods on dyn* object 2022-09-12 16:55:57 -07:00
Eric Holk
c5441acf67 Call destructors when dyn* object goes out of scope 2022-09-12 16:55:57 -07:00
Eric Holk
549c105bb3 dyn* through more typechecking and MIR 2022-09-12 16:55:56 -07:00
Eric Holk
7fccac3ea0 Typecheck dyn* coercions
Also changes things to treat dyn* as a sized type, unlike dyn Trait.
2022-09-12 16:55:56 -07:00
Eric Holk
6c01273a15 Plumb dyn trait representation through ty::Dynamic 2022-09-12 16:55:55 -07:00
Eric Holk
eff35e59c6 Introduce dyn_star feature flag
The primary purpose of this commit is to introduce the
dyn_star flag so we can begin experimenting with implementation.

In order to have something to do in the feature gate test, we also add
parser support for `dyn* Trait` objects. These are currently treated
just like `dyn Trait` objects, but this will change in the future.

Note that for now `dyn* Trait` is experimental syntax to enable
implementing some of the machinery needed for async fn in dyn traits
without fully supporting the feature.
2022-09-12 16:55:55 -07:00
Andrew Pollack
875194099c Adding ignore-fuchsia arg to non-applicable compiler ui tests 2022-09-12 22:38:49 +00:00
bors
089584db01 Auto merge of #101736 - GuillaumeGomez:rollup-f71kjdb, r=GuillaumeGomez
Rollup of 8 pull requests

Successful merges:

 - #100185 (Fix `ReErased` leaking into typeck due to `typeof(...)` recovery)
 - #100291 (constify some `CStr` methods)
 - #101677 (Add test for #101211)
 - #101723 (Impove diagnostic for `.await`ing non-futures)
 - #101724 (Allow unauthenticated users to add the `const-hack` label)
 - #101731 (rustdoc: improve rustdoc HTML suggestions handling of nested generics)
 - #101732 (Feature gate the `rustdoc::missing_doc_code_examples` lint)
 - #101735 (rustdoc: fix treatment of backslash-escaped HTML)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-12 22:15:47 +00:00
Michael Goulet
c2cff68d84 Don't trim substitution if it's only whitespace 2022-09-12 22:08:30 +00:00
Michael Goulet
370c816a71 A SubstitutionPart is not a deletion if it replaces nothing with nothing 2022-09-12 22:08:30 +00:00
Michael Howell
b96322801e rustdoc: remove no-op CSS .search-results .result-name > span
The rule `display: inline-block` was added in
5afa52bc7d.
The `margin: 0` and `font-weight: normal` were added in
c01bd560e2.

Both seem to have been added to override class-based rules that were
targetted at method sections. See
<c01bd560e2/src/librustdoc/html/static/rustdoc.css (L140-L148)>
for an example. The selectors that these were meant to override were changed
in a8318e420d and
76a3b609d0 to be more specific, so they no
longer need to be overridden.
2022-09-12 14:04:11 -07:00
Guillaume Gomez
031a2f85a5
Rollup merge of #101735 - notriddle:notriddle/backslash-escaped-html, r=GuillaumeGomez
rustdoc: fix treatment of backslash-escaped HTML

Try generating HTML for this markup:

    \<a href="https://example.com">example</a>

It will produce text, not HTML, in both rustdoc's real HTML output and in the commonmark reference implementation:

https://spec.commonmark.org/dingus/?text=%5C%3Ca%20href%3D%22https%3A%2F%2Fexample.com%22%3Eexample%3C%2Fa%3E
2022-09-12 22:47:18 +02:00
Guillaume Gomez
ac92cc861c
Rollup merge of #101732 - Nemo157:gate-rustdoc-missing-examples, r=GuillaumeGomez
Feature gate the `rustdoc::missing_doc_code_examples` lint

Moves the lint from being implicitly active on nightly `rustdoc` to requiring a feature to activate, like other unstable lints.

Uses the new tracking issue https://github.com/rust-lang/rust/issues/101730
2022-09-12 22:47:18 +02:00
Guillaume Gomez
05a267fd84
Rollup merge of #101731 - notriddle:notriddle/more-improved-html-check, r=GuillaumeGomez
rustdoc: improve rustdoc HTML suggestions handling of nested generics

Based on some poor suggestions produced when stablizing this lint and running it on `manformed-generics.rs` in #101720
2022-09-12 22:47:17 +02:00
Guillaume Gomez
bbe23e86ec
Rollup merge of #101724 - fee1-dead-contrib:triage-const-hack, r=oli-obk
Allow unauthenticated users to add the `const-hack` label

Observed in #101401.

cc ```@oli-obk```
2022-09-12 22:47:16 +02:00
Guillaume Gomez
8dc4b26b60
Rollup merge of #101723 - lukas-code:await-diag, r=compiler-errors
Impove diagnostic for `.await`ing non-futures

Strip leading whitespace from the span and use a non-verbose suggestion.
fixes #101715
2022-09-12 22:47:15 +02:00
Guillaume Gomez
57273313ae
Rollup merge of #101677 - winxpqq955:issue-101211, r=fee1-dead
Add test for #101211

Closes #101211
2022-09-12 22:47:14 +02:00
Guillaume Gomez
7fc3183520
Rollup merge of #100291 - WaffleLapkin:cstr_const_methods, r=oli-obk
constify some `CStr` methods

This PR marks the following public APIs as `const`:
```rust
impl CStr {
    // feature(const_cstr_from_bytes)
    pub const fn from_bytes_until_nul(bytes: &[u8]) -> Result<&CStr, FromBytesUntilNulError>;
    pub const fn from_bytes_with_nul(bytes: &[u8]) -> Result<&Self, FromBytesWithNulError>;

    // feature(const_cstr_to_bytes)
    pub const fn to_bytes(&self) -> &[u8];
    pub const fn to_bytes_with_nul(&self) -> &[u8];
    pub const fn to_str(&self) -> Result<&str, str::Utf8Error>;
}
```

r? ```@oli-obk``` (use of `const_eval_select` :P )
cc ```@mina86``` (you've asked for this <3 )
2022-09-12 22:47:14 +02:00
Guillaume Gomez
b7504d6f4f
Rollup merge of #100185 - compiler-errors:issue-100183, r=wesleywiser
Fix `ReErased` leaking into typeck due to `typeof(...)` recovery

Fixes #100183
2022-09-12 22:47:13 +02:00
Michael Howell
29f789ffdc rustdoc: fix treatment of backslash-escaped HTML
Try generating HTML for this markup:

    \<a href="https://example.com">example</a>

It will produce text, not HTML, in both rustdoc's real HTML output and in
the commonmark reference implementation:

https://spec.commonmark.org/dingus/?text=%5C%3Ca%20href%3D%22https%3A%2F%2Fexample.com%22%3Eexample%3C%2Fa%3E
2022-09-12 12:48:22 -07:00
bors
fa6ee93752 Auto merge of #101729 - oli-obk:miriup, r=oli-obk
Update miri submodule

r? `@ghost`

fixes #101649
2022-09-12 19:34:30 +00:00
Wim Looman
72cf46aa72
Feature gate the rustdoc::missing_doc_code_examples lint 2022-09-12 21:20:24 +02:00
Guillaume Gomez
c4559ebfde
Improve Attribute doc methods 2022-09-12 21:18:59 +02:00
Michael Howell
84ca399465 rustdoc: improve rustdoc HTML suggestions handling of nested generics
Based on some poor suggestions produced when stablizing this lint and running
it on `manformed-generics.rs`
2022-09-12 11:11:37 -07:00
Wim Looman
fd1a399c4f
Allow tool-lints to specify a feature-gate too 2022-09-12 20:08:58 +02:00
Markus Reiter
14230a7f8e
Simplify clippy fix. 2022-09-12 19:46:51 +02:00
Oli Scherer
cccd99c976 Update miri submodule 2022-09-12 17:19:31 +00:00
Markus Reiter
8c78400c54
Fix clippy. 2022-09-12 19:04:17 +02:00
Markus Reiter
d01498a902
Add rustc_diagnostic_item for IP addresses. 2022-09-12 19:04:17 +02:00
Markus Reiter
f7e8ba28a4
Flatten net module again. 2022-09-12 19:04:17 +02:00
Markus Reiter
a1e4a339ed
Move net::parser into net::addr module. 2022-09-12 19:04:17 +02:00
Markus Reiter
65003fd4e3
Add tests for SockAddr Display. 2022-09-12 19:04:16 +02:00
Markus Reiter
96b44f6f65
Use DisplayBuffer for socket addresses. 2022-09-12 19:04:16 +02:00
bors
52e003a6e9 Auto merge of #99334 - NiklasJonsson:84447/error-privacy, r=oli-obk
rustc_error, rustc_private: Switch to stable hash containers

Relates https://github.com/rust-lang/rust/issues/84447
2022-09-12 15:57:37 +00:00
fee1-dead
91398912d0
Allow unauthenticated users to add the const-hack label 2022-09-12 23:04:32 +08:00
Lukas Markeffsky
2b7fb8d941 Impove diagnostic for .await-ing non-futures 2022-09-12 16:54:25 +02:00
Daniil Belov
ffa83596fe change rlib format to discern native dependencies 2022-09-12 16:45:03 +03:00