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

Only look for main at the crate level #6119

Closed
wants to merge 3 commits into from
Closed

Conversation

brson
Copy link
Contributor

@brson brson commented Apr 30, 2013

r? @ILyoan

This pulls all the logic for discovering the crate entry point into a new pass (out of resolve and typeck), then changes it so that main is only looked for at the crate level (#[main] can still be used anywhere).

I don't understand the special android logic here and worry that I may have broken it.

It doesn't have anything to do with resolve and the logic will likely get
more involved in the future, after rust-lang#4433
@brson
Copy link
Contributor Author

brson commented May 7, 2013

OK, @ILyoan I think this is fixed for Android. Can you re-review?

@ILyoan
Copy link
Contributor

ILyoan commented May 8, 2013

@brson Thank you! This is looking good to me
@yichoi Could you take a look to confirm this?

@yichoi
Copy link
Contributor

yichoi commented May 8, 2013

@ILyoan +1

@ILyoan
Copy link
Contributor

ILyoan commented May 8, 2013

Failed on two compile-fail test cases.

  • src/test/compile-fail/tag-variant-disr-dup.rs
  • src/test/compile-fail/issue-2995.rs

expecting other error messages, but got 'main function not found'

otherwise it's good.

I don't understand what this logic is doing
@brson
Copy link
Contributor Author

brson commented May 8, 2013

Thanks for the help @ILyoan and @yichoi

bors added a commit that referenced this pull request May 8, 2013
r? @ILyoan

This pulls all the logic for discovering the crate entry point into a new pass (out of resolve and typeck), then changes it so that main is only looked for at the crate level (`#[main]` can still be used anywhere).

I don't understand the special android logic here and worry that I may have broken it.
@bors bors closed this May 8, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 20, 2020
Add a case to `lint_search_is_some` to handle searching strings

Fixes: rust-lang#6010

This adds a lint which recommends using `contains()` instead of `find()` followed by `is_some()` on strings as suggested in rust-lang#6010.

This was added as an additional case to
https://github.com/rust-lang/rust-clippy/blob/5af88e3c2d8cc4fb74a0e455381669930ee3a31a/clippy_lints/src/methods/mod.rs#L3037

I would really appreciate any comments/suggestions for my code!

changelog: Added case to `lint_search_is_some` to handle searching strings
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.

None yet

4 participants