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

ANN: don't suggest adding unsafe to main function in build scripts #8594

Merged
merged 3 commits into from Feb 25, 2022

Conversation

Undin
Copy link
Member

@Undin Undin commented Feb 22, 2022

Also:

  • introduce a proper API to check if the function is main one. Use it in AddUnsafeFix to support all cases including main functions in build scripts and not to depend on org.rust.cargo.runconfig package
  • don't show run line marker for main function in file with no_main attribute

Improvement of #8571

changelog: Don't show run line marker for main function in file with no_main attribute

@Undin Undin added this to the v167 milestone Feb 22, 2022
@Undin Undin added this to In Progress in To test via automation Feb 22, 2022
@Undin
Copy link
Member Author

Undin commented Feb 22, 2022

CC @Stzx

These changes introduce new `RsFunction.isMain` property to check if function is main one. It allows not to depend on `org.rust.cargo.runconfig` package in other packages.
Also, the new property correctly handle `no_main` attribute and build script targets
@Undin Undin modified the milestones: v167, v166 Feb 25, 2022
@Undin Undin added the fix Pull requests that fix some bug(s) label Feb 25, 2022
Copy link
Member

@mchernyavsky mchernyavsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 25, 2022

Build succeeded:

@bors bors bot merged commit 5f5e6fe into master Feb 25, 2022
To test automation moved this from In Progress to Test Feb 25, 2022
@Undin Undin deleted the undin/main-function-api branch February 26, 2022 07:32
@neonaot neonaot self-assigned this Mar 1, 2022
@neonaot neonaot moved this from Test to Done in To test Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Pull requests that fix some bug(s)
Projects
To test
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants