about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-06-04Add regresion test for #87142Yuki Okushi-0/+32
2022-06-04test: add `xous` to well-known-values.stderrSean Cross-1/+1
Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-04Rollup merge of #97722 - compiler-errors:tighten-copy-type-error-spans, ↵Dylan DPC-8/+8
r=Dylan-DPC Tighten spans for bad fields in struct deriving `Copy` r? `@estebank` Closes #89137 for good, I think Not sure if this is what you were looking for in https://github.com/rust-lang/rust/issues/89137#issuecomment-1146201791
2022-06-04Rollup merge of #97716 - compiler-errors:issue-97708, r=wesleywiserDylan DPC-0/+50
Fix reachability analysis for const methods Use `method_might_be_inlined` directly for `ImplItemKind::Fn` instead of duplicating the logic in `def_id_represents_local_inlined_item`. This is parallel to how we use `item_might_be_inlined` for `ItemKind::Fn` in that same body. Fixes #97708
2022-06-04Rollup merge of #97715 - xFrednet:97650-expect-in-fuction-arg, r=wesleywiserDylan DPC-43/+68
Support the `#[expect]` attribute on fn parameters (RFC-2383) A small PR to allow the `#[expect]` attribute on function parameters. Nothing more to say, I hope everyone reading this has a lovely day. --- r? ``@wesleywiser`` closes: https://github.com/rust-lang/rust/issues/97650 cc: https://github.com/rust-lang/rust/issues/85549
2022-06-03Tighten spans for bad fields in Copy structMichael Goulet-8/+8
2022-06-03Encode MIR for 'unreachable' non-generic fnsMichael Goulet-0/+50
2022-06-04Support the `#[expect]` attribute on fn parameters (RFC-2383)xFrednet-43/+68
2022-06-04Fix `delayed_good_path_bug` ice for expected diagnostics (RFC 2383)xFrednet-0/+8
2022-06-04Rollup merge of #97696 - cjgillot:normalize-inline, r=compiler-errorsMatthias Krüger-0/+24
Do not ICE when failing to normalize during inlining. Fixes https://github.com/rust-lang/rust/issues/97695
2022-06-04Rollup merge of #97656 - EdwinRy:error_ast_low_type_contraint_parentheses, ↵Matthias Krüger-1/+35
r=cjgillot Add a suggestion to replace parentheses with angle brackets on associated trait constraint This implements a requested suggestion FIXME in [`compiler/rustc_ast_lowering/src/lib.rs` ](https://github.com/rust-lang/rust/blob/9598b4b594c97dff66feb93522e22db500deea07/compiler/rustc_ast_lowering/src/lib.rs#L921) The suggestion asks for the parentheses to either be replaced with angle brackets or removed completely depending on whether there are arguments provided within. ![image](https://user-images.githubusercontent.com/20026256/171770414-ab60bfe2-ae27-44b0-964d-9ffcc32a7475.png) ![image](https://user-images.githubusercontent.com/20026256/171770383-ca8a2766-b3aa-43e3-8ba4-ae18874886ce.png) r? `@oli-obk`
2022-06-03Fully stabilize NLLJack Huey-11933/+1726
2022-06-03Fail gracefully when encountering an HRTB in APIT.Camille GILLOT-0/+22
2022-06-03Normalize consts' tys when relating with adt_const_paramsMichael Goulet-0/+88
2022-06-03Auto merge of #85993 - bjorn3:serde_json, r=wesleywiserbors-113/+111
Remove all json handling from rustc_serialize Json is now handled using serde_json. Where appropriate I have replaced json usage with binary serialization (rmeta files) or manual string formatting (emcc linker arg generation). This allowed for removing and simplifying a lot of code, which hopefully results in faster serialization/deserialization and faster compiles of rustc itself. Where sensible we now use serde. Metadata and incr cache serialization keeps using a heavily modified (compared to crates.io) rustc-serialize version that in the future could probably be extended with zero-copy deserialization or other perf tricks that serde can't support due to supporting more than one serialization format. Note that I had to remove `-Zast-json` and `-Zast-json-noexpand` as the relevant AST types don't implement `serde::Serialize`. Fixes #40177 See also https://github.com/rust-lang/compiler-team/issues/418
2022-06-03Do not ICE when failing to normalize during inlining.Camille GILLOT-0/+24
2022-06-03Fix all testsbjorn3-35/+111
2022-06-03Remove support for -Zast-json and -Zast-json-noexpandbjorn3-78/+0
2022-06-03Suggest replace parentheses with angle bracketsEdwinRy-1/+35
2022-06-03Auto merge of #97694 - Dylan-DPC:rollup-2yxo7ce, r=Dylan-DPCbors-232/+709
Rollup of 3 pull requests Successful merges: - #97415 (Compute `is_late_bound_map` query separately from lifetime resolution) - #97471 (Provide more context when denying invalid type params ) - #97681 (Add more eslint checks) Failed merges: - #97446 (Make hir().get_generics and generics_of consistent.) r? `@ghost` `@rustbot` modify labels: rollup
2022-06-03Rollup merge of #97471 - estebank:prohibit-generics, r=cjgillotDylan DPC-232/+709
Provide more context when denying invalid type params
2022-06-03Auto merge of #89862 - lcnr:path-generics-diagnostics, r=estebankbors-594/+1268
rewrite error handling for unresolved inference vars Pretty much completely rewrites `fn emit_inference_failure_err`. This new setup should hopefully be easier to extend and is already a lot better when looking for generic arguments. Because this is a rewrite there are still some parts which are lacking, these are tracked in #94483 and will be fixed in later PRs. r? `@estebank` `@petrochenkov`
2022-06-03Auto merge of #97679 - Dylan-DPC:rollup-nswmgmx, r=Dylan-DPCbors-11/+195
Rollup of 5 pull requests Successful merges: - #97366 (Stabilize `{slice,array}::from_ref`) - #97653 (add cast kind of from_exposed_addr (int-to-ptr casts)) - #97663 (take back half-baked noaliasing check in Assignment) - #97664 (On E0204 suggest missing type param bounds) - #97668 (rustdoc: clean up primitive.slice.html links) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-06-03Conservatively report "not sure" in cfg_accessibleUrgau-32/+56
2022-06-03Rollup merge of #97668 - notriddle:notriddle/slice-link, r=jshaDylan DPC-0/+32
rustdoc: clean up primitive.slice.html links Before: <a href="https://doc.rust-lang.org/stable/std/boxed/struct.Box.html">Box</a>&lt;<a href="https://doc.rust-lang.org/stable/std/primitive.slice.html">[</a>T<a href="https://doc.rust-lang.org/stable/std/primitive.slice.html">]</a>&gt; After: <a href="https://doc.rust-lang.org/stable/std/boxed/struct.Box.html">Box</a>&lt;<a href="https://doc.rust-lang.org/stable/std/primitive.slice.html">[T]</a>&gt;
2022-06-03Rollup merge of #97664 - estebank:suggest-bound-derive-copy, r=compiler-errorsDylan DPC-10/+162
On E0204 suggest missing type param bounds ``` error[E0204]: the trait `Copy` may not be implemented for this type --> f42.rs:9:17 | 9 | #[derive(Debug, Copy, Clone)] | ^^^^ 10 | pub struct AABB<K>{ 11 | pub loc: Vector2<K>, | ------------------- this field does not implement `Copy` 12 | pub size: Vector2<K> | -------------------- this field does not implement `Copy` | note: the `Copy` impl for `Vector2<K>` requires that `K: Debug` --> f42.rs:11:5 | 11 | pub loc: Vector2<K>, | ^^^^^^^^^^^^^^^^^^^ note: the `Copy` impl for `Vector2<K>` requires that `K: Debug` --> f42.rs:12:5 | 12 | pub size: Vector2<K> | ^^^^^^^^^^^^^^^^^^^^ = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider restricting type parameter `K` | 10 | pub struct AABB<K: Debug>{ | +++++++ ``` Fix #89137.
2022-06-03Rollup merge of #97653 - RalfJung:int-to-ptr, r=oli-obkDylan DPC-1/+1
add cast kind of from_exposed_addr (int-to-ptr casts) This is basically the dual to https://github.com/rust-lang/rust/pull/97582, for int2ptr casts. Cc `@tmiasko` https://github.com/rust-lang/rust/issues/97649
2022-06-03Auto merge of #96296 - cjgillot:remove-label-lt-shadow, r=petrochenkovbors-1395/+78
Remove label/lifetime shadowing warnings This PR removes some pre-1.0 shadowing warnings for labels and lifetimes. The current behaviour of the compiler is to warn * labels that shadow unrelated labels in the same function --> removed ```rust 'a: loop {} 'a: loop {} // STOP WARNING ``` * labels that shadow enclosing labels --> kept, but only if shadowing is hygienic ```rust 'a: loop { 'a: loop {} // KEEP WARNING } ``` * labels that shadow lifetime --> removed ```rust fn foo<'a>() { 'a: loop {} // STOP WARNING } ``` * lifetimes that shadow labels --> removed ```rust 'a: loop { let b = Box::new(|x: &i8| *x) as Box<dyn for <'a> Fn(&'a i8) -> i8>; // STOP WARNING } ``` * lifetimes that shadow lifetimes --> kept ```rust fn foo<'a>() { let b = Box::new(|x: &i8| *x) as Box<dyn for <'a> Fn(&'a i8) -> i8>; // KEEP WARNING } ``` Closes https://github.com/rust-lang/rust/issues/31745. ----- From `@petrochenkov` in https://github.com/rust-lang/rust/pull/95781#issuecomment-1105199014 > I think we should remove these silly checks entirely. > They were introduced long time ago in case some new language features appear and require this space. > Now we have another mechanism for such language changes - editions, and if "lifetimes in expressions" or something like that needs to be introduced it could be introduced as an edition change. > However, there was no plans to introduce anything like for years, so it's unlikely that even the edition mechanism will be necessary. r? rust-lang/lang
2022-06-03Use the same message as type & const generics.Camille GILLOT-19/+19
2022-06-03Do not lower generic lifetime params when AST resolution emitted an error.Camille GILLOT-12/+2
2022-06-03Auto merge of #97497 - c410-f3r:z-errors, r=petrochenkovbors-0/+0
Move some tests to more reasonable places r? `@petrochenkov`
2022-06-02review commentsEsteban Küber-28/+28
2022-06-02Tweak outputEsteban Küber-6/+0
2022-06-02rustdoc: clean up primitive.slice.html linksMichael Howell-0/+32
2022-06-02Rollup merge of #97645 - lcnr:derived-impl-debug, r=cjgillotMatthias Krüger-30/+5
don't use a `span_note` for ignored impls Searching for the `derive` isn't too difficult as it's right above the field definition. By using a span these errors are a lot more verbose than they should be, which is especially annoying as one can end up with a lot of `dead_code` warnings.
2022-06-02Rollup merge of #97640 - ↵Matthias Krüger-0/+24
TaKO8Ki:fix-wrong-suggestion-for-adding-where-clauses, r=lcnr Fix wrong suggestion for adding where clauses closes #97576
2022-06-02Rollup merge of #97627 - lcnr:comment-tick, r=Dylan-DPCMatthias Krüger-7/+7
update explicit impls error msg
2022-06-02Rollup merge of #97502 - onlineSoftwareDevOK:rustdocTests, r=GuillaumeGomezMatthias Krüger-0/+42
rustdoc: Add more test coverage Related issue https://github.com/rust-lang/rust/issues/91113
2022-06-02On E0204 suggest missing type param boundsEsteban Küber-10/+168
``` error[E0204]: the trait `Copy` may not be implemented for this type --> f42.rs:9:17 | 9 | #[derive(Debug, Copy, Clone)] | ^^^^ 10 | pub struct AABB<K>{ 11 | pub loc: Vector2<K>, | ------------------- this field does not implement `Copy` 12 | pub size: Vector2<K> | -------------------- this field does not implement `Copy` | note: the `Copy` impl for `Vector2<K>` requires that `K: Debug` --> f42.rs:11:5 | 11 | pub loc: Vector2<K>, | ^^^^^^^^^^^^^^^^^^^ note: the `Copy` impl for `Vector2<K>` requires that `K: Debug` --> f42.rs:12:5 | 12 | pub size: Vector2<K> | ^^^^^^^^^^^^^^^^^^^^ = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider restricting type parameter `K` | 10 | pub struct AABB<K: Debug>{ | +++++++ ``` Fix #89137.
2022-06-02Rebase fallout.Camille GILLOT-95/+7
2022-06-02Stop warning against unrelated labels.Camille GILLOT-427/+42
2022-06-02Bless tests.Camille GILLOT-267/+0
2022-06-02Bless tests.Camille GILLOT-774/+207
2022-06-02Auto merge of #97654 - Dylan-DPC:rollup-w6zrzxf, r=Dylan-DPCbors-86/+124
Rollup of 5 pull requests Successful merges: - #97420 (Be a little nicer with casts when formatting `fn` pointers) - #97450 ([RFC 2011] Basic compiler infrastructure) - #97599 (Fix JSON reexport ICE) - #97617 (Rustdoc anonymous reexports) - #97636 (Revert #96682.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-06-02rustdoc: Add more test coverageonlinesoftwaredevok@protonmail.com-0/+42
2022-06-02add cast kind of from_exposed_addr (int-to-ptr casts)Ralf Jung-1/+1
2022-06-02Rollup merge of #97636 - nnethercote:revert-96682, r=dtolnayDylan DPC-86/+59
Revert #96682. The change was "Show invisible delimiters (within comments) when pretty printing". It's useful to show these delimiters, but is a breaking change for some proc macros. Fixes #97608. r? ``@petrochenkov``
2022-06-02Rollup merge of #97617 - GuillaumeGomez:rustdoc-anonymous-reexports, r=Nemo157Dylan DPC-0/+22
Rustdoc anonymous reexports Fixes #97615. r? `@Nemo157`
2022-06-02Rollup merge of #97599 - GuillaumeGomez:reexport-json, r=CraftSpiderDylan DPC-0/+17
Fix JSON reexport ICE Fixes https://github.com/rust-lang/rust/issues/97432. The problem was that the ID was conflicting because the reexports have the same one. To fix it, I "extended" it by adding the `Symbol` into it as well. r? `@notriddle`
2022-06-02Rollup merge of #97450 - c410-f3r:assert-compiler, r=oli-obkDylan DPC-0/+26
[RFC 2011] Basic compiler infrastructure Splitting https://github.com/rust-lang/rust/pull/96496 into smaller pieces as was done in https://github.com/rust-lang/rust/pull/97233. Hope review will be easier. This PR practically contains no logic and only serves as a building ground for the actual code that will be placed in a posterior step. * Adds `context.rs` to place the new `assert!` logic. Has a lot of unused elements but all of them are used by the implementation. * Creates an unstable flag because the feature is not yet complete and also to allow external feedback. * Creates the necessary `sym` identifiers that are mostly based on the library elements -> https://github.com/rust-lang/rust/blob/master/library/core/src/asserting.rs * Modifies `assert.rs` to branch to `context.rs` if the unstable flag is enabled. * Adds a test to satisfy tidy but the test does nothing in reality.