Commit Graph

211414 Commits

Author SHA1 Message Date
Boxy
d75cd5c051 fmt 2022-11-25 09:28:43 +00:00
Boxy
8c729bd0f3 handle nested obligations in satisfied_from_param_env 2022-11-25 09:28:43 +00:00
kadmin
5bb1a9febc Add expand_abstract_const
Adds the ability to directly expand a const to an expr without having to deal with intermediate
steps.
2022-11-25 09:28:43 +00:00
kadmin
f9750c1554 Add empty ConstKind::Abstract
Initial pass at expr/abstract const/s

Address comments

Switch to using a list instead of &[ty::Const], rm `AbstractConst`

Remove try_unify_abstract_consts

Update comments

Add edits

Recurse more

More edits

Prevent equating associated consts

Move failing test to ui

Changes this test from incremental to ui, and mark it as failing and a known bug.
Does not cause the compiler to ICE, so should be ok.
2022-11-25 09:28:43 +00:00
Fabian Hintringer
69d562d684 change example of array_from_fn to match suggestion 2022-11-25 10:05:07 +01:00
Oli Scherer
208bb933e7 Use "must be init" instead of "must not be uninit" everywhere 2022-11-25 08:40:27 +00:00
Oli Scherer
5446a52b4b Add a because to errors derived from fields 2022-11-25 08:40:03 +00:00
Oli Scherer
9b6f8e500c Add a test for OOB ranges 2022-11-25 08:39:50 +00:00
Oli Scherer
d7f5d784d7 Simplify and document range layout computation 2022-11-25 08:39:11 +00:00
Oli Scherer
fcb1f1874f Don't show fields from other crates 2022-11-25 08:12:16 +00:00
Oli Scherer
2e79f5f9f8 Move a comment to the right place 2022-11-25 08:11:53 +00:00
Oli Scherer
98c550ecc8 Reinstate the previous compact form of "in this field" errors 2022-11-25 08:11:29 +00:00
Oli Scherer
545fccaab4 Add a test for scalar pair layout validation 2022-11-25 08:11:16 +00:00
Oli Scherer
ccaa28bf69 Don't try to compute the layout of generic types. 2022-11-25 08:10:52 +00:00
Oli Scherer
2bed079103 Compute layout instead of manually procesisng the layout restriction attributes 2022-11-25 08:10:29 +00:00
Oli Scherer
5cbf172909 Print a trace through types to show how to get to the problematic type 2022-11-25 08:09:52 +00:00
Oli Scherer
9909cb902f Make the ICEs in the mir typechecker have more spans helpful 2022-11-25 08:01:12 +00:00
Oli Scherer
6773e7ee56 More manual formatting 2022-11-25 08:00:49 +00:00
Oli Scherer
c3eb8f2778 rustc_layout_scalar_valid_range can be applied to scalar pairs and affects teh first scalar 2022-11-25 08:00:26 +00:00
Oli Scherer
2b8963a94c Some manual formatting of let..else statements 2022-11-25 08:00:02 +00:00
Ralf Jung
6ed4f15940 RefCell::get_mut: fix typo
and fix the same typo in a bunch of other places
2022-11-25 08:52:06 +01:00
Oli Scherer
2a94a2d385 Prefer not accessing the private field of newtype_index types 2022-11-25 07:51:56 +00:00
Oli Scherer
b5554722ff Add helper method to ScalarInt 2022-11-25 07:47:56 +00:00
bors
41e0363055 Auto merge of #104602 - petrochenkov:effvisperf5, r=oli-obk
privacy: Fix more (potential) issues with effective visibilities

Continuation of https://github.com/rust-lang/rust/pull/103965.
See individual commits for more detailed description of the changes.

The shortcuts removed in 4eb63f618e and c7c7d16727 could actually be correct (or correct after some tweaks), but they used global reasoning like "we can skip this update because if the code compiles then some other update should do the same thing eventually".
I have some expertise in this area, but I still have doubt whether such global reasoning was correct or not, especially in presence of all possible exotic cases with imports.
After this PR all table changes should be "locally correct" after every update, even if it may be overcautious.
If similar optimizations are introduced again they will need detailed comments explaining why it's legal to do what they do and providing proofs.

Fixes https://github.com/rust-lang/rust/issues/104249.
Fixes https://github.com/rust-lang/rust/issues/104539.
2022-11-25 06:14:42 +00:00
bors
af63e3b39f Auto merge of #104855 - thomcc:revert-noinline-wintls, r=ChrisDenton
Revert "Forbid inlining `thread_local!`'s `__getit` function on Windows"

Revert of #101368, fixes #104852.

I'd rather not do this since that's a soundness fix and this is hitting some compiler bug, but I don't really know an alternative.

r? `@ChrisDenton`
2022-11-25 03:17:25 +00:00
Scott McMurray
9d68a1a74c Tune RepeatWith::try_fold and Take::for_each and Vec::extend_trusted 2022-11-24 19:14:19 -08:00
Santiago Pastorino
974e2837bb
Introduce PredicateKind::Clause 2022-11-25 00:04:54 -03:00
Oli Scherer
42cc8e8f4e
Simplify a bunch of trait ref obligation creations 2022-11-25 00:04:54 -03:00
Oli Scherer
08afabddac
get rid of to_poly_trait_predicate 2022-11-25 00:04:52 -03:00
Thom Chiovoloni
24712f9982
Revert "Forbid inlining thread_local!'s __getit function on Windows"
This reverts commit 3099dfdd9f.
2022-11-24 18:12:12 -08:00
Joshua Nelson
99d080dc3c Fix typo in miri sysroot 2022-11-24 20:28:55 -05:00
Joshua Nelson
fb3e724d76 Don't set is_preview for clippy and rustfmt
These have been shipped on stable for many years now and it would be very disruptive to ever remove them.
Remove the `-preview` suffix from their dist components.
2022-11-24 20:22:08 -05:00
bors
65a6e22668 Auto merge of #104845 - matthiaskrgr:rollup-tckj956, r=matthiaskrgr
Rollup of 11 pull requests

Successful merges:

 - #104514 (Use node_ty_opt to avoid ICE in visit_ty)
 - #104704 (Allow power10-vector feature in PowerPC)
 - #104747 (resolve: Don't use constructor def ids in the map for field names)
 - #104773 (OpaqueCast projections are always overlapping, they can't possibly be disjoint)
 - #104774 (Document split{_ascii,}_whitespace() for empty strings)
 - #104780 (make `error_reported` check for delayed bugs)
 - #104782 (Bump the const eval step limit)
 - #104792 (rustdoc: simplify `.search-results-title` CSS)
 - #104796 (lint: do not warn unused parens around higher-ranked function pointers)
 - #104820 (Remove normalize_projection_type)
 - #104822 (with_query_mode -> new)

Failed merges:

 - #104716 (move 2 candidates into builtin candidate)
 - #104841 (Assert that we don't capture escaping bound vars in `Fn` trait selection)

r? `@ghost`
`@rustbot` modify labels: rollup
2022-11-24 23:45:32 +00:00
Guillaume Gomez
e6a4008d24 Strenghten GUI test to include extra state in selector 2022-11-24 23:39:49 +01:00
Guillaume Gomez
6fc52c6b80 Extend GUI test to include more source code elements checks 2022-11-24 23:36:41 +01:00
Guillaume Gomez
786ec7ccf1 Migrate source code elements style to CSS variables 2022-11-24 23:36:26 +01:00
Nicholas Nethercote
2c5d3705ec Clarify SyntaxExtensionKind::LegacyDerive. 2022-11-25 09:13:27 +11:00
Michael Goulet
d945967779 Remove comment, simplify since we asserted fn ptr Self type has no bound vars 2022-11-24 21:50:04 +00:00
Michael Goulet
c7330c9fe8 Also check that fn pointer candidates don't have escaping bound vars 2022-11-24 21:50:04 +00:00
Michael Goulet
8927135274 Assert that we don't capture escaping bound vars in Fn trait selection 2022-11-24 21:50:04 +00:00
Matthias Krüger
1048a85dbe
Rollup merge of #104822 - spastorino:selctx-new-instead-of-with_query_mode, r=lcnr
with_query_mode -> new

r? ```@lcnr```
2022-11-24 21:34:57 +01:00
Matthias Krüger
73f01ffd46
Rollup merge of #104820 - spastorino:remove-normalize_projection_type, r=jackh726
Remove normalize_projection_type

r? ``@lcnr``
2022-11-24 21:34:56 +01:00
Matthias Krüger
83d1aab9ff
Rollup merge of #104796 - notriddle:notriddle/unused-issue-104397, r=oli-obk
lint: do not warn unused parens around higher-ranked function pointers

Fixes #104397
2022-11-24 21:34:56 +01:00
Matthias Krüger
ed2d9369f4
Rollup merge of #104792 - notriddle:notriddle/crate-search-title-display, r=GuillaumeGomez
rustdoc: simplify `.search-results-title` CSS

By using `display: flex`, we still get the never-wrapping layout with `#crate-search-div` maxing out and truncating its text. The title itself winds up always filling its parent, but since `#crate-search` doesn't have `flex-grow` set, it won't fill available space.
2022-11-24 21:34:55 +01:00
Matthias Krüger
679f1b7892
Rollup merge of #104782 - oli-obk:const_eval_limit_bump, r=pnkfelix
Bump the const eval step limit

fixes https://github.com/rust-lang/rust/issues/103814

https://github.com/rust-lang/rust/pull/103877 has too much of an impact to beta backport. So let's just increase the limit, avoiding the immediate breakage.

r? ``@pnkfelix``
2022-11-24 21:34:55 +01:00
Matthias Krüger
4843946a10
Rollup merge of #104780 - BoxyUwU:error_reported_not_be_bad, r=oli-obk
make `error_reported` check for delayed bugs

Fixes #104768

`error_reported()` was only checking if there were errors emitted, not for `delay_bug`s which can also be a source of `ErrorGuaranteed`. I assume the same is true of `lint_err_count` but i dont know
2022-11-24 21:34:54 +01:00
Matthias Krüger
d4e5418b0c
Rollup merge of #104774 - vojtechkral:doc-str-empty-split-whitespace, r=thomcc
Document split{_ascii,}_whitespace() for empty strings

doc change only
2022-11-24 21:34:54 +01:00
Matthias Krüger
9a558b68e1
Rollup merge of #104773 - oli-obk:overlap, r=lcnr
OpaqueCast projections are always overlapping, they can't possibly be disjoint

r? ``@lcnr``
2022-11-24 21:34:53 +01:00
Matthias Krüger
0e4eb0da33
Rollup merge of #104747 - petrochenkov:ctorfields, r=cjgillot
resolve: Don't use constructor def ids in the map for field names

Also do some minor cleanup to insertion of those field names.

Addresses a FIXME left in https://github.com/rust-lang/rust/pull/103578.
2022-11-24 21:34:53 +01:00
Matthias Krüger
7a17d61d3d
Rollup merge of #104704 - ecnelises:p10vec, r=jackh726
Allow power10-vector feature in PowerPC

Note that we don't have `power10-altivec`:

57fd7ffeff/llvm/lib/Target/PowerPC/PPC.td (L277-L280)
2022-11-24 21:34:52 +01:00