Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
359bfa901b9d8eddbed7b88b6716dbb77b7bfb95
rust/tests/ui/duplicate/duplicate-parameter.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

6 lines
116 B
Rust
Raw Normal View History

Update compile fail tests to use isize.
2015-01-08 21:54:35 +11:00
fn f(a: isize, a: isize) {}
librustc: Forbid duplicate name bindings in the same parameter or type parameter list. This breaks code like: fn f(a: int, a: int) { ... } fn g<T,T>(a: T) { ... } Change this code to not use the same name for a parameter. For example: fn f(a: int, b: int) { ... } fn g<T,U>(a: T) { ... } Code like this is *not* affected, since `_` is not an identifier: fn f(_: int, _: int) { ... } // OK Closes #17568. [breaking-change]
2014-10-08 21:28:50 -07:00
//~^ ERROR identifier `a` is bound more than once in this parameter list
fn main() {
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3096ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API