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

Rollup of 12 pull requests #35652

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
127489a
Update compiler error 0093 to use new error format
stanislav-tkach Aug 9, 2016
1a6fac7
E0248 Change in issue format
shyamsundarb-arch Aug 7, 2016
5c2c19a
Update error message for E0253 #35512
lukehinds Aug 9, 2016
c974749
Update E0253.rs
lukehinds Aug 10, 2016
92f7e85
Update E0138 to new format
wdv4758h Aug 10, 2016
b9762f8
Update E0033 to the new error format
munyari Aug 8, 2016
1c37892
Update E0220 message to new format
chamoysvoice Aug 6, 2016
80beeb3
Add additional error note
munyari Aug 11, 2016
4209f94
Add label to E0254
tvladyslav Aug 10, 2016
c761184
Fix tidy tests
tvladyslav Aug 11, 2016
4ab00e4
updated E0070 to new error format
clementmiao Aug 12, 2016
302a423
Update E0301 to the new format
krzysztofgarczynski Aug 12, 2016
5402d28
Update E0302 to the new format
krzysztofgarczynski Aug 13, 2016
bd90a16
updated E0067 to new error format
clementmiao Aug 13, 2016
85388f0
E0094 error message updated
theypsilon Aug 13, 2016
58738a9
Rollup merge of #35346 - DarkEld3r:e0093-formatting, r=jonathandturner
Aug 13, 2016
c71662c
Rollup merge of #35412 - chamoysvoice:e0220, r=jonathandturner
Aug 13, 2016
dd26a38
Rollup merge of #35526 - munyari:e0033, r=jonathandturner
Aug 13, 2016
7d4cc15
Rollup merge of #35558 - lukehinds:master, r=nikomatsakis
Aug 13, 2016
0d7927d
Rollup merge of #35573 - wdv4758h:E0138, r=jonathandturner
Aug 13, 2016
d58a53d
Rollup merge of #35586 - shyaamsundhar:SqushCom, r=jonathandturner
Aug 13, 2016
229b98d
Rollup merge of #35596 - crypto-universe:E0254_style_and_tests, r=jon…
Aug 13, 2016
a2e88ad
Rollup merge of #35615 - clementmiao:E0070_new_error_format, r=jonath…
Aug 13, 2016
9c704cc
Rollup merge of #35616 - clementmiao:E0067_new_error_format, r=jonath…
Aug 13, 2016
a7865b6
Rollup merge of #35643 - garekkream:update-E0301-new-error-format, r=…
Aug 13, 2016
4b13676
Rollup merge of #35644 - garekkream:update-E0302-new-error-format, r=…
Aug 13, 2016
913d2f7
Rollup merge of #35646 - theypsilon:master, r=jonathandturner
Aug 13, 2016
5e9dc84
Fix tidy warning
Aug 13, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update E0138 to new format
  • Loading branch information
wdv4758h committed Aug 11, 2016
commit 92f7e85b303b67c2e412275ba663bb811388f9a4
9 changes: 7 additions & 2 deletions src/librustc/middle/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,13 @@ fn find_item(item: &Item, ctxt: &mut EntryContext, at_root: bool) {
if ctxt.start_fn.is_none() {
ctxt.start_fn = Some((item.id, item.span));
} else {
span_err!(ctxt.session, item.span, E0138,
"multiple 'start' functions");
struct_span_err!(
ctxt.session, item.span, E0138,
"multiple 'start' functions")
.span_label(ctxt.start_fn.unwrap().1,
&format!("previous `start` function here"))
.span_label(item.span, &format!("multiple `start` functions"))
.emit();
}
},
EntryPointType::None => ()
Expand Down
5 changes: 4 additions & 1 deletion src/test/compile-fail/E0138.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

#[start]
fn foo(argc: isize, argv: *const *const u8) -> isize {}
//~^ NOTE previous `start` function here

#[start]
fn f(argc: isize, argv: *const *const u8) -> isize {} //~ ERROR E0138
fn f(argc: isize, argv: *const *const u8) -> isize {}
//~^ ERROR E0138
//~| NOTE multiple `start` functions