Skip to content
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

Rollup of 7 pull requests #69543

Closed
wants to merge 39 commits into from
Closed
Changes from 2 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
81e4027
Update RELEASES.md for 1.42.0
XAMPPRocky Feb 9, 2020
26fdcbb
Update RELEASES.md
XAMPPRocky Feb 9, 2020
7ab01b2
Update RELEASES.md
XAMPPRocky Feb 10, 2020
32daa2a
Update RELEASES.md
XAMPPRocky Feb 10, 2020
b030280
Blacklist powerpc-unknown-linux-gnu as having non-ignored GNU C ZSTs.
anyska Feb 18, 2020
9fa8d87
Add more context to E0599 errors
estebank Feb 18, 2020
24bfa16
Reduce vebosity of E0599
estebank Feb 18, 2020
70255ef
On single local candidate, use span label
estebank Feb 18, 2020
2e8399d
Deduplicate information in E0599
estebank Feb 18, 2020
1b4c5b5
Track all predicates in errors, not just trait obligations
estebank Feb 19, 2020
9a7345b
Show information of chain of bound obligations
estebank Feb 19, 2020
615542a
Point at closure definitions
estebank Feb 19, 2020
9245415
Mention the full path of the implementing trait
estebank Feb 19, 2020
cfbb746
Tweak wording
estebank Feb 19, 2020
7818a1d
Suggest constraining type parameters
estebank Feb 19, 2020
3a58953
Account for arbitrary self types in E0599
estebank Feb 19, 2020
529b891
Review comments: split requirement text to multiple lines for readabi…
estebank Feb 21, 2020
5da3939
miri/machine: add canonical_alloc_id hook to replace find_foreign_static
RalfJung Feb 23, 2020
e7a344f
Update RELEASES.md
XAMPPRocky Feb 23, 2020
01d9329
canonicalize alloc ID before calling tag_static_base_pointer
RalfJung Feb 23, 2020
9b62d60
fmt
RalfJung Feb 23, 2020
162d727
Also blacklist powerpc-unknown-linux-musl.
anyska Feb 24, 2020
a66599f
keep predicate order and tweak output
estebank Feb 25, 2020
c02de78
Reduce verbosity when suggesting restricting type params
estebank Feb 25, 2020
0173490
Reword message
estebank Feb 25, 2020
c02e56a
Do not suggest implementing traits if present in predicates
estebank Feb 25, 2020
526280a
Merge branch 'master' into relnotes-1.42.0
XAMPPRocky Feb 26, 2020
e6c8596
Revert "Backport only: avoid ICE on bad placeholder type"
estebank Feb 27, 2020
a7b727d
Account for bounds when denying `_` in type parameters
estebank Feb 13, 2020
c6cfcf9
Account for associated items when denying `_`
estebank Feb 17, 2020
4e0bea3
Stabilize `boxed_slice_try_from`
JohnTitor Feb 28, 2020
85b585d
late resolve, visit_fn: bail early if there's no body.
Centril Feb 28, 2020
35d64ee
Rollup merge of #68989 - XAMPPRocky:relnotes-1.42.0, r=Mark-Simulacrum
Dylan-DPC Feb 28, 2020
0c3a8cd
Rollup merge of #69148 - estebank:cold-as-ice, r=oli-obk
Dylan-DPC Feb 28, 2020
88f66f1
Rollup merge of #69255 - estebank:e0599-details, r=varkor
Dylan-DPC Feb 28, 2020
e5da563
Rollup merge of #69263 - anyska:blacklist-powerpc-zst, r=nagisa
Dylan-DPC Feb 28, 2020
04f5aae
Rollup merge of #69408 - RalfJung:canonical-alloc-id, r=oli-obk
Dylan-DPC Feb 28, 2020
bad53f3
Rollup merge of #69538 - JohnTitor:boxed-slice-try-from, r=Centril
Dylan-DPC Feb 28, 2020
a1b918a
Rollup merge of #69539 - Centril:fix-69401, r=petrochenkov
Dylan-DPC Feb 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/librustc_resolve/late.rs
Original file line number Diff line number Diff line change
@@ -456,8 +456,9 @@ impl<'a, 'ast> Visitor<'ast> for LateResolutionVisitor<'a, '_, 'ast> {
}
fn visit_fn(&mut self, fn_kind: FnKind<'ast>, sp: Span, _: NodeId) {
let rib_kind = match fn_kind {
FnKind::Fn(FnCtxt::Foreign, ..) => return visit::walk_fn(self, fn_kind, sp),
FnKind::Fn(FnCtxt::Free, ..) => FnItemRibKind,
// Bail if there's no body.
FnKind::Fn(.., None) => return visit::walk_fn(self, fn_kind, sp),
FnKind::Fn(FnCtxt::Free, ..) | FnKind::Fn(FnCtxt::Foreign, ..) => FnItemRibKind,
FnKind::Fn(FnCtxt::Assoc(_), ..) | FnKind::Closure(..) => NormalRibKind,
};
let previous_value = replace(&mut self.diagnostic_metadata.current_function, Some(sp));
6 changes: 6 additions & 0 deletions src/test/ui/resolve/issue-69401-trait-fn-no-body-ty-local.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
fn main() {}

trait Foo {
fn fn_with_type_named_same_as_local_in_param(b: b);
//~^ ERROR cannot find type `b` in this scope
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
error[E0412]: cannot find type `b` in this scope
--> $DIR/issue-69401-trait-fn-no-body-ty-local.rs:4:53
|
LL | fn fn_with_type_named_same_as_local_in_param(b: b);
| ^ not found in this scope

error: aborting due to previous error

For more information about this error, try `rustc --explain E0412`.