rust icon indicating copy to clipboard operation
rust copied to clipboard

When building a test runner, don't remove the main function

Open brson opened this issue 13 years ago • 2 comments

The test runner works by generating its own main function and deleting from the AST any existing function tagged with #[main]. Now that we have a #[main] attribute, we don't actually need to remove the main function, just the attribute.

Note that this doesn't affect main functions that don't have the attribute, since that main is silently ignored when there's a #[main] somewhere.

brson avatar Jan 14 '13 22:01 brson

let me do this

ILyoan avatar Jan 15 '13 04:01 ILyoan

Fixed!

brson avatar Jan 16 '13 01:01 brson