-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Report infer ty errors during hir ty lowering #142420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
impl ForeignItemKind<'_> { | ||
pub fn descr(&self) -> &'static str { | ||
match self { | ||
ForeignItemKind::Fn(..) => "function", | ||
ForeignItemKind::Static(..) => "static variable", | ||
ForeignItemKind::Type => "type", | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could probably just use tcx.def_descr
, but it causes a lot of diffs across the test suite because it calls associated functions associated functions
or methods
respectively
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a FIXME to the match on item kind in report_placeholder_type_error
.
//~^ ERROR: the placeholder `_` is not allowed within types on item signatures for functions | ||
//~^ ERROR: the placeholder `_` is not allowed within types on item signatures for opaque types | ||
//~| ERROR: the placeholder `_` is not allowed within types on item signatures for opaque types | ||
//~| ERROR: the placeholder `_` is not allowed within types on item signatures for opaque types | ||
//~| ERROR: the placeholder `_` is not allowed within types on item signatures for opaque types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is a bit dumb, but I could special case Synthetic
things separately handle opaque types to also check if they are part of an afit
17b63c8
to
993b819
Compare
993b819
to
b4492d2
Compare
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #142438) made this pull request unmergeable. Please resolve the merge conflicts. |
b4492d2
to
e7c1ba8
Compare
This PR changes a file inside |
based on #142449 as the crashes tests were "fixed" by this PR only in as much as that they stopped ICEing, but the error message was referring to |
e7c1ba8
to
fb8cfca
Compare
☔ The latest upstream changes (presumably #142685) made this pull request unmergeable. Please resolve the merge conflicts. |
fb8cfca
to
3db719c
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Report infer ty errors during hir ty lowering This centralizes the placeholder type error reporting in one location, but it also exposes the granularity at which we convert things from hir to ty more. E.g. previously infer types in where bounds were errored together with the function signature, but now they are independent. r? `@compiler-errors`
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (3dd01ac): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.7%, secondary 2.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -1.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 692.705s -> 693.181s (0.07%) |
perf is noise in ctfe |
3db719c
to
f329df3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me pls squash
impl ForeignItemKind<'_> { | ||
pub fn descr(&self) -> &'static str { | ||
match self { | ||
ForeignItemKind::Fn(..) => "function", | ||
ForeignItemKind::Static(..) => "static variable", | ||
ForeignItemKind::Type => "type", | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a FIXME to the match on item kind in report_placeholder_type_error
.
e21b47e
to
110cf7e
Compare
@bors r=compiler-errors |
@bors rollup |
…piler-errors Report infer ty errors during hir ty lowering This centralizes the placeholder type error reporting in one location, but it also exposes the granularity at which we convert things from hir to ty more. E.g. previously infer types in where bounds were errored together with the function signature, but now they are independent. r? `@compiler-errors`
…piler-errors Report infer ty errors during hir ty lowering This centralizes the placeholder type error reporting in one location, but it also exposes the granularity at which we convert things from hir to ty more. E.g. previously infer types in where bounds were errored together with the function signature, but now they are independent. r? ``@compiler-errors``
@bors r- merge conflict |
☔ The latest upstream changes (presumably #142255) made this pull request unmergeable. Please resolve the merge conflicts. |
This centralizes the placeholder type error reporting in one location, but it also exposes the granularity at which we convert things from hir to ty more. E.g. previously infer types in where bounds were errored together with the function signature, but now they are independent.
110cf7e
to
c51f05b
Compare
@bors r=compiler-errors |
…piler-errors Report infer ty errors during hir ty lowering This centralizes the placeholder type error reporting in one location, but it also exposes the granularity at which we convert things from hir to ty more. E.g. previously infer types in where bounds were errored together with the function signature, but now they are independent. r? `@compiler-errors`
Rollup of 6 pull requests Successful merges: - #142270 (Rustdoc js: even more typechecking improvements) - #142420 (Report infer ty errors during hir ty lowering) - #142818 (Port `#[used]` to new attribute parsing infrastructure) - #143020 (codegen_fn_attrs: make comment more precise) - #143036 (Remove support for `dyn*` from the compiler) - #143060 (Only args in main diag are saved and restored without removing the newly added ones) r? `@ghost` `@rustbot` modify labels: rollup
…piler-errors Report infer ty errors during hir ty lowering This centralizes the placeholder type error reporting in one location, but it also exposes the granularity at which we convert things from hir to ty more. E.g. previously infer types in where bounds were errored together with the function signature, but now they are independent. r? ``@compiler-errors``
Rollup of 10 pull requests Successful merges: - #142270 (Rustdoc js: even more typechecking improvements) - #142420 (Report infer ty errors during hir ty lowering) - #142671 (add #![rustc_no_implicit_bounds]) - #142721 (Add tracing to `InterpCx::layout_of()` ) - #142818 (Port `#[used]` to new attribute parsing infrastructure) - #143020 (codegen_fn_attrs: make comment more precise) - #143051 (Add tracing to `validate_operand`) - #143060 (Only args in main diag are saved and restored without removing the newly added ones) - #143065 (Improve recovery when users write `where:`) - #143084 (const-eval: error when initializing a static writes to that static) r? `@ghost` `@rustbot` modify labels: rollup
This centralizes the placeholder type error reporting in one location, but it also exposes the granularity at which we convert things from hir to ty more. E.g. previously infer types in where bounds were errored together with the function signature, but now they are independent.
r? @compiler-errors