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

Re-enable corrected error line printing and highlighting #681

Closed
wants to merge 3 commits into from

Conversation

jdm
Copy link
Contributor

@jdm jdm commented Jul 13, 2011

make fast-check now works correctly, as does regular check.

@brson
Copy link
Contributor

brson commented Jul 13, 2011

I saw you mention this on IRC, but if I put a syntax error in, e.g. lib/str.rs, by writting "bogus" on line 1, the compiler errors with

../src/lib/str.rs:1:23942:1:23942: error: expected item but found bogus
../src/lib/str.rs:1 rt: ---
rt: d76f:main:main:                   upcall fail 'Assertion begin <= end failed', /media/src/rust-tinderbox/srcdir-snap-stage3-x86_64-unknown-linux-gnu/src/lib/str.rs:392
rt: d76f:main:                        domain main @0x9269db8 root task failed

which is wrong

@brson
Copy link
Contributor

brson commented Jul 13, 2011

Oh, I see that existed before this patch

@jdm jdm closed this Jul 13, 2011
@jdm
Copy link
Contributor Author

jdm commented Jul 13, 2011

I'm closing this for now until I work out the kinks, such as having errors on the first line. I'm not entirely sure what's up.

@brson
Copy link
Contributor

brson commented Jul 13, 2011

This is looking good, but I see one more related problem it would be nice to fix before reenabling this. If i modify lib/str.rs to write "bogus" on line 53, like:

export unsafe_from_bytes_ivec;
bogus
native "rust" mod rustrt {

then run make stage1/lib/libstd.so, the error printed ends up dumping out the entirety of str.rs from 'bogus' on (it's hitting the 'if ((line as uint) + 1u >= vec::len(fm.lines))' case in get_line.

This behavior is kind of unfriendly, can we make this case, instead of printing the rest of the file, just print up to the next newline?

@jdm jdm reopened this Jul 13, 2011
@jdm jdm closed this Jul 13, 2011
marysaka pushed a commit to sunriseos/rust that referenced this pull request Oct 20, 2019
bors pushed a commit to rust-lang-ci/rust that referenced this pull request Oct 26, 2020
ZuseZ4 added a commit to EnzymeAD/rust that referenced this pull request Mar 7, 2023
The `@_ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z`
one seems strange to me, but based on my libstdc++ usage probably ok. 

How about generally getting (slowly) rid of this list by calling 
`std::string llvm::demangle(const std::string &MangledName)`
in `llvm/Demangle/Demangle.h` for every function missing a definition?
If it succeeds we can still match the beginning, but using the demangled name 
it should end up in a shorter comparison list and we should miss less functions. 
I didn't run into a single fn which I couldn't demangle with llvm-c++filt, so I guess it's valid to still panic then.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants