Skip to content

romaji fails to build on beta,  #55810

Closed
Closed
@Mark-Simulacrum

Description

@Mark-Simulacrum
Member

romaji, cc @uzimith

With a few minutes of time invested I wasn't able to narrow this down to a smaller example that still succeeded on stable.

! 
Nov 02 07:32:11.418 INFO kablam! error[E0282]: type annotations needed
Nov 02 07:32:11.418 INFO kablam!   --> src/romaji.rs:80:24
Nov 02 07:32:11.418 INFO kablam!    |
Nov 02 07:32:11.418 INFO kablam! 80 |                 x if x.is_youon() && buffer.is_katakana() => {
Nov 02 07:32:11.419 INFO kablam!    |                        ^^^^^^^^ cannot infer type for `T`
Nov 02 07:32:11.419 INFO kablam!    |
Nov 02 07:32:11.419 INFO kablam!    = note: type must be known at this point

cc @rust-lang/libs

Activity

added
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
on Nov 9, 2018
dtolnay

dtolnay commented on Nov 9, 2018

@dtolnay
Member

Minimized:

struct S;

impl S {
    fn method(&self) -> bool {
        unimplemented!()
    }
}

fn get<T>() -> T {
    unimplemented!()
}

fn main() {
    match get() {
        x if x.method() => {}
        &S => {}
    }
}
added
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
and removed
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
on Nov 9, 2018
dtolnay

dtolnay commented on Nov 9, 2018

@dtolnay
Member

@rust-lang/compiler because this doesn't look to be caused by a library change.

pnkfelix

pnkfelix commented on Nov 9, 2018

@pnkfelix
Member

Hmm I wonder if this is some sort of bad interaction between 1. the new way to do pat variables in guards (which is activated by NLL) and 2. Method lookup and/or autoref...

... but this test isn’t asking for the 2018 edition, right? (I think we are still building the old style MIR if you don’t request NLL. But maybe that changed ...)

self-assigned this
on Nov 9, 2018
eddyb

eddyb commented on Nov 9, 2018

@eddyb
Member

This can be caused by the typeck order. To make this work, all arms' patterns must be checked before any guards are.

pnkfelix

pnkfelix commented on Nov 9, 2018

@pnkfelix
Member

This was injected between rustc 1.31.0-nightly (46880f4 2018-10-15) and rustc 1.31.0-nightly (bef62cc 2018-10-16)

Log of bors commits in that time in the details block

% git log 46880f4..bef62cc --author bors --format=oneline
bef62cc Auto merge of #54486 - orium:obligation-forest-graphviz, r=nikomatsakis
8a7048b Auto merge of #54251 - varkor:silence-bad_style, r=Manishearth
99ab2f4 Auto merge of #54937 - alexcrichton:update-stdsimd, r=nikomatsakis
5ea8eb5 Auto merge of #55067 - ljedrz:generic_iterator_related_improvements, r=petrochenkov
df0d6ad Auto merge of #55023 - euclio:llvm-error-handler, r=cuviper

pnkfelix

pnkfelix commented on Nov 9, 2018

@pnkfelix
Member

Hmm this line in the description of #55067 set off some alarm bells in my head:

typeck: don't collect into a vector when unnecessary

added a commit that references this issue on Nov 12, 2018

Auto merge of #55893 - pnkfelix:issue-55810-beta-backport-of-pr-55819…

c341a59
goffrie

goffrie commented on Nov 14, 2018

@goffrie
Contributor

Fixed by #55893?

dtolnay

dtolnay commented on Nov 14, 2018

@dtolnay
Member

Confirmed fixed as of nightly-2018-11-12 -- rustc 1.32.0-nightly (ca79ecd 2018-11-11) -- and rustc 1.31.0-beta.9 (c341a59 2018-11-12).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @eddyb@pnkfelix@goffrie@dtolnay@Mark-Simulacrum

      Issue actions

        romaji fails to build on beta, · Issue #55810 · rust-lang/rust