Maybe Waffle
1e0747f8d2
normalize forbidden slices
2022-05-30 18:27:07 +04:00
Gary Guo
0a7a0ff4d9
Add #[inline]
to Vec
's Deref/DerefMut
2022-05-30 15:11:53 +01:00
David Wood
f669b78ffc
errors: simplify referring to fluent attributes
...
To render the message of a Fluent attribute, the identifier of the
Fluent message must be known. `DiagnosticMessage::FluentIdentifier`
contains both the message's identifier and optionally the identifier of
an attribute. Generated constants for each attribute would therefore
need to be named uniquely (amongst all error messages) or be able to
refer to only the attribute identifier which will be combined with a
message identifier later. In this commit, the latter strategy is
implemented as part of the `Diagnostic` type's functions for adding
subdiagnostics of various kinds.
Signed-off-by: David Wood <david.wood@huawei.com>
2022-05-30 13:38:19 +01:00
Dylan DPC
a352ad500d
Rollup merge of #97545 - thomcc:sip-comment-safety, r=Dylan-DPC
...
Reword safety comments in core/hash/sip.rs
In https://rust-lang.zulipchat.com/#narrow/stream/136281-t-lang.2Fwg-unsafe-code-guidelines/topic/Is.20there.20any.20way.20to.20soundly.20do.20a.20masked.20out-of-bounds.20read.3F/near/284329248 it came up that this is using an atypical (and somewhat vague) phrasing of the safety requirement, so this slightly rewords it.
2022-05-30 14:33:53 +02:00
Dylan DPC
65bdfe3b41
Rollup merge of #97531 - compiler-errors:for-loop-pat-mismatch, r=davidtwco
...
Note pattern mismatch coming from `for` loop desugaring
Fixes #97163
2022-05-30 14:33:52 +02:00
Dylan DPC
9bb3832ebd
Rollup merge of #97519 - binggh:readd-help-on-error, r=jyn514
...
Re-add help_on_error for download-ci-llvm
Closes #97503
- Re-added `help_on_error` for `download_component()` and the downstream functions
- Removed dead code in `bootstrap.py`
Thanks `@jyn514` for the helpful tips!
(first contribution here, please let me know if I missed anything out!)
2022-05-30 14:33:51 +02:00
Dylan DPC
106d5fde92
Rollup merge of #97504 - JohnTitor:cleanup-deps, r=davidtwco
...
Ensure source file present when calculating max line number
Resubmission of #89268 , fixes #71363
The behavior difference of `simulate-remapped-rust-src-base` is not something we should take into account here, so limiting targets to run the test makes sense, I think.
r? `@davidtwco,` and `@estebank,` you might be interested in this change
2022-05-30 14:33:50 +02:00
Dylan DPC
8fd9e24b9a
Rollup merge of #97499 - est31:master, r=Dylan-DPC
...
Remove "sys isn't exported yet" phrase
The oldest occurence is from 9e224c2bf1
,
which is from the pre-1.0 days. In the years since then, std::sys still
hasn't been exported, and the last attempt was met with strong criticism:
https://github.com/rust-lang/rust/pull/97151
Thus, removing the "yet" part makes a lot of sense.
2022-05-30 14:33:49 +02:00
Dylan DPC
0ed320bdb9
Rollup merge of #97494 - est31:remove_box_alloc_tests, r=Dylan-DPC
...
Use Box::new() instead of box syntax in library tests
The tests inside `library/*` have no reason to use `box` syntax as they have 0 performance relevance. Therefore, we can safely remove them (instead of having to use alternatives like the one in #97293 ).
2022-05-30 14:33:48 +02:00
bors
946a88a989
Auto merge of #97546 - RalfJung:miri, r=oli-obk
...
update Miri
First update with the new ui test suite, let's hope this all works. :)
r? `@oli-obk`
Fixes https://github.com/rust-lang/rust/issues/97486
2022-05-30 11:59:55 +00:00
Maybe Waffle
1f8a6410bf
test forbidden slices on all two usizesizes
2022-05-30 15:44:56 +04:00
Maybe Waffle
6d10217382
--bless
2022-05-30 15:44:56 +04:00
Maybe Waffle
0cca47ea1a
Use // error-pattern:
header in forbidden_slices.rs
test
2022-05-30 15:44:56 +04:00
Maybe Waffle
10ee6f8e06
Rename slice_from_ptr_range_const -> const_slice_from_ptr_range
...
This is in line with other `const fn` features.
2022-05-30 15:44:56 +04:00
Maybe Waffle
a63a83a8b6
Add ui tests for slice::from_{ptr_range,raw_parts}
2022-05-30 15:44:56 +04:00
Maybe Waffle
ff9efd8a55
Add reexport of slice::from{,_mut}_ptr_range to alloc & std
...
At first I was confused why `std::slice::from_ptr_range` didn't work :D
2022-05-30 15:44:56 +04:00
Maybe Waffle
19caa8c89b
Make from{,_mut}_ptr_range
const
...
- `from_ptr_range` uses `#![feature(slice_from_ptr_range_const)]`
- `from_mut_ptr_range` uses `#![feature(slice_from_mut_ptr_range_const)]`
2022-05-30 15:44:55 +04:00
Ralf Jung
962d54e5e8
be less redundant redundant
2022-05-30 12:35:01 +02:00
Guillaume Gomez
70db59ca35
Add GUI test for settings display
2022-05-30 12:12:43 +02:00
Guillaume Gomez
5b6c5933cc
Move theme rules out of settings.css
2022-05-30 12:12:43 +02:00
Guillaume Gomez
e8d0fbf4eb
Improve display of settings radio buttons
2022-05-30 12:12:43 +02:00
Oli Scherer
3c66939671
Let miri decide the flags to use for the test suite
2022-05-30 12:10:28 +02:00
est31
6d63d3b888
Remove "sys isn't exported yet" phrase
...
The oldest occurence is from 9e224c2bf1
,
which is from the pre-1.0 days. In the years since then, std::sys still
hasn't been exported, and the last attempt was met with strong criticism:
https://github.com/rust-lang/rust/pull/97151
Thus, removing the "yet" part makes a lot of sense.
2022-05-30 12:07:43 +02:00
bors
5c780b98d1
Auto merge of #96964 - oli-obk:const_trait_mvp, r=compiler-errors
...
Replace `#[default_method_body_is_const]` with `#[const_trait]`
pulled out of #96077
related issues: #67792 and #92158
cc `@fee1-dead`
This is groundwork to only allowing `impl const Trait` for traits that are marked with `#[const_trait]`. This is necessary to prevent adding a new default method from becoming a breaking change (as it could be a non-const fn).
2022-05-30 09:19:03 +00:00
Oli Scherer
2f96fbe220
update diagnostic message on removed attribute
...
Co-authored-by: fee1-dead <ent3rm4n@gmail.com>
2022-05-30 08:52:25 +00:00
Oli Scherer
0e3d8d2b13
Default methods of traits are also AssocFn defs as they essentially desugar to a method in a new impl block
2022-05-30 08:52:25 +00:00
Oli Scherer
ecaf7b7cee
Reduce the scope of a mutable variable
2022-05-30 08:52:25 +00:00
Oli Scherer
4d390de4a3
Add a helper function for checking whether a default function in a trait can be treated as const
2022-05-30 08:52:25 +00:00
Deadbeef
257f06587c
Remove #[default..]
and add #[const_trait]
2022-05-30 08:52:24 +00:00
Ralf Jung
a272c45678
update Miri
2022-05-30 10:17:46 +02:00
Thom Chiovoloni
eeacb4403c
Reword safety comments in core/hash/sip.rs
2022-05-30 01:06:08 -07:00
SparrowLii
0be2ca96fa
Optimize the diagnostic generation for extern unsafe
2022-05-30 15:56:43 +08:00
bors
855fc022fe
Auto merge of #97489 - GuillaumeGomez:settings-js-disabled, r=notriddle
...
Add sentence in case JS is disabled on settings.html page
Instead of having an empty page, it'll look like this:
![Screenshot from 2022-05-28 17-46-23](https://user-images.githubusercontent.com/3050060/170833333-e1a59c2b-27ca-47da-9c08-2356e4a689cb.png )
r? `@notriddle`
2022-05-30 04:15:10 +00:00
bors
6999ef2564
Auto merge of #97538 - compiler-errors:rollup-zp3ukke, r=compiler-errors
...
Rollup of 4 pull requests
Successful merges:
- #97493 (Use `type_is_copy_modulo_regions` check in intrisicck)
- #97518 (Fix order of closing HTML elements in rustdoc output)
- #97530 (Add more eslint checks)
- #97536 (Remove unused lifetimes from expand_macro)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-05-29 23:25:51 +00:00
Michael Goulet
f20bbc1fb0
Rollup merge of #97536 - est31:remove_unused_lifetimes, r=compiler-errors
...
Remove unused lifetimes from expand_macro
The function doesn't need the lifetimes
of the two arguments be bound together.
2022-05-29 16:25:05 -07:00
Michael Goulet
8e01595d9b
Rollup merge of #97530 - GuillaumeGomez:more-eslint-checks, r=jsha
...
Add more eslint checks
Here is a new batch of eslint checks:
* [no-const-assign](https://eslint.org/docs/rules/no-const-assign )
* [no-debugger](https://eslint.org/docs/rules/no-debugger )
* [no-dupe-args](https://eslint.org/docs/rules/no-dupe-args )
* [no-duple-else-if](https://eslint.org/docs/rules/no-dupe-else-if )
* [no-dupe-keys](https://eslint.org/docs/rules/no-dupe-keys )
* [no-duplicate-case](https://eslint.org/docs/rules/no-duplicate-case )
* [no-ex-assign](https://eslint.org/docs/rules/no-ex-assign )
r? ``@notriddle``
2022-05-29 16:25:04 -07:00
Michael Goulet
f68c532e6f
Rollup merge of #97518 - badboy:rustdoc-ul-div-fix, r=notriddle
...
Fix order of closing HTML elements in rustdoc output
Initially reported here: https://users.rust-lang.org/t/documentation-itself-parsed-error/76232
2022-05-29 16:25:03 -07:00
Michael Goulet
56026e2fc6
Rollup merge of #97493 - compiler-errors:issue-97490, r=oli-obk
...
Use `type_is_copy_modulo_regions` check in intrisicck
This one canoncalizes region variables correctly, preventing an ICE
Fixes #97490
2022-05-29 16:25:02 -07:00
est31
311aacf0d0
Remove unused lifetimes from expand_macro
...
The function doesn't need the lifetimes
of the two arguments be bound together.
2022-05-29 23:53:24 +02:00
Michael Goulet
46d34cc922
Use type_is_copy_modulo_regions check in intrisicck
2022-05-29 13:06:50 -07:00
Michael Goulet
2e25c2346b
Note pattern mismatch coming from for-loop desugaring
2022-05-29 13:01:59 -07:00
Guillaume Gomez
f1a95b834c
Add "no-ex-assign" eslint rule
2022-05-29 21:44:10 +02:00
Guillaume Gomez
d39703a6c5
Add "no-duplicate-case" eslint rule
2022-05-29 21:43:37 +02:00
bors
28b891916d
Auto merge of #97514 - WaffleLapkin:panick, r=Dylan-DPC
...
Fix typo (panick -> panic)
Fix typo (panick -> panic) in `std::error` module docs.
2022-05-29 19:42:39 +00:00
Guillaume Gomez
88c3d707a6
Add "no-dupe-keys" eslint rule
2022-05-29 21:42:26 +02:00
Guillaume Gomez
397ad826b0
Add "no-dupe-else-if" eslint rule
2022-05-29 21:42:24 +02:00
Conrad Ludgate
5dd0fe301a
remove useless cold
2022-05-29 20:40:56 +01:00
Conrad Ludgate
3f404bfa86
improve format impl for literals
2022-05-29 20:40:56 +01:00
Guillaume Gomez
9f79a03ca5
Add "no-dup-args" eslint rule
2022-05-29 21:40:16 +02:00
Guillaume Gomez
4bb728da79
Add "no-debugger" eslint rule
2022-05-29 21:39:44 +02:00