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

Inspecific span when struct has no field #8263

Closed
emberian opened this issue Aug 3, 2013 · 2 comments
Closed

Inspecific span when struct has no field #8263

emberian opened this issue Aug 3, 2013 · 2 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@emberian
Copy link
Member

emberian commented Aug 3, 2013

struct Foo {
    f: uint
}

struct Bar {
    foo: uint
}

fn foo(f: Bar) -> Foo {
    Foo {
        foo: f.foo
    }
}
foo.rs:11:8: 11:18 error: structure has no field named `foo`
foo.rs:11         foo: f.foo
                  ^~~~~~~~~~
error: aborting due to previous error

A different error is given if f has no field foo.

@emberian
Copy link
Member Author

The error should be:

foo.rs:11:8: 11:11 error: structure `Foo` has no field named `foo`
foo.rs:11         foo: f.foo
                  ^~~
error: aborting due to previous error

@pythonesque
Copy link
Contributor

I'm taking a crack at this issue.

pythonesque added a commit to pythonesque/rust that referenced this issue Oct 29, 2013
@bors bors closed this as completed in 01ab854 Oct 29, 2013
Jarcho pushed a commit to Jarcho/rust that referenced this issue Aug 29, 2022
…Alexendoo

Fix [`non_ascii_literal`] in tests

changelog: Don't lint [`non_ascii_literal`] when using non-ascii comments in tests
changelog: Don't lint [`non_ascii_literal`] when `allow`ed on tests

closes: rust-lang#7739
closes: rust-lang#8263
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants