Commit Graph

169199 Commits

Author SHA1 Message Date
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
Guillaume Gomez
6b4191f5e0 Add "no-const-assign" eslint rule 2022-05-29 21:38:52 +02:00
bors
bef2b7cd1c Auto merge of #97214 - Mark-Simulacrum:stage0-bump, r=pietroalbini
Finish bumping stage0

It looks like the last time had left some remaining cfg's -- which made me think
that the stage0 bump was actually successful. This brings us to a released 1.62
beta though.

This now brings us to cfg-clean, with the exception of check-cfg-features in bootstrap;
I'd prefer to leave that for a separate PR at this time since it's likely to be more tricky.

cc https://github.com/rust-lang/rust/pull/97147#issuecomment-1132845061

r? `@pietroalbini`
2022-05-29 16:28:21 +00:00
Giacomo Stevanato
8ef2dd70e6 Clarify the guarantees of Vec::as_ptr and Vec::as_mut_ptr when there's no allocation 2022-05-29 17:43:35 +02:00
binggh
c0f18f9412 Re-add help_on_error for download-ci-llvm
Remove dead code

Missing }

./x.py fmt

Remove duplicate check

Recursively remove all usage of help_on_error
2022-05-29 23:16:10 +08:00
bors
9d1aeaeb82 Auto merge of #94214 - nikic:rust-opaque-pointers, r=cuviper
Prepare Rust for opaque pointers

Fix one codegen bug with opaque pointers, and update our IR tests to accept both typed pointer and opaque pointer IR. This is a bit annoying, but unavoidable if we want decent test coverage on both LLVM 14 and LLVM 15.

This prepares Rust for when LLVM will enable opaque pointers by default.
2022-05-29 14:12:42 +00:00
Jan-Erik Rediger
9f68b998db Fix order of closing HTML elements in rustdoc output 2022-05-29 15:22:25 +02:00
bors
abc7681a76 Auto merge of #97456 - Bryysen:issue-97319-fix, r=compiler-errors
Improve error message for E0081

Closes #97319
2022-05-29 12:00:30 +00:00
Maybe Waffle
f344d569b4 Fix typo (panick -> panic) 2022-05-29 13:14:59 +04:00
bors
0f06824013 Auto merge of #97287 - compiler-errors:type-interner, r=jackh726,oli-obk
Move things to `rustc_type_ir`

Finishes some work proposed in https://github.com/rust-lang/compiler-team/issues/341.

r? `@ghost`
2022-05-29 08:20:13 +00:00
bors
303d916867 Auto merge of #96687 - jyn514:download-rustc, r=Mark-Simulacrum
Move download-rustc from python to rustbuild

- Remove download-rustc handling from bootstrap.py
- Allow a custom `pattern` in `builder.unpack()`
- Only download rustc once another part of bootstrap depends on it.

  This is somewhat necessary since the download functions rely on having a full
  `Builder`, which isn't available until after config parsing finishes.

Helps with https://github.com/rust-lang/rust/issues/94829.
2022-05-29 05:56:09 +00:00