std: Remove i18n/l10n from format!

* The select/plural methods from format strings are removed
* The # character no longer needs to be escaped
* The \-based escapes have been removed
* '{{' is now an escape for '{'
* '}}' is now an escape for '}'

Closes #14810
[breaking-change]
This commit is contained in:
Alex Crichton
2014-05-28 09:24:28 -07:00
parent f9260d41d6
commit cac7a2053a
57 changed files with 736 additions and 1087 deletions

View File

@@ -634,9 +634,14 @@ impl<'a> Parser<'a> {
let closer =
match self.pos('}') {
Some(i) => i,
#[cfg(stage0)]
None => return self.err(format!(
"Missing '\\}' for unclosed '\\{' at position {}",
self.chari).as_slice()),
#[cfg(not(stage0))]
None => return self.err(format!(
"Missing '}}' for unclosed '{{' at position {}",
self.chari).as_slice()),
};
if closer - self.chari + 1 == 0 {
return self.err("No Unicode class name found.")
@@ -695,11 +700,18 @@ impl<'a> Parser<'a> {
let start = self.chari + 2;
let closer =
match self.pos('}') {
#[cfg(stage0)]
None => {
return self.err(format!("Missing '\\}' for unclosed \
'\\{' at position {}",
start).as_slice())
}
#[cfg(not(stage0))]
None => {
return self.err(format!("Missing '}}' for unclosed \
'{{' at position {}",
start).as_slice())
}
Some(i) => i,
};
self.chari = closer;