Skip to content

Commit c38bddc

Browse files
Fix nightly (#5560)
1 parent 3694bfe commit c38bddc

File tree

8 files changed

+38
-34
lines changed

8 files changed

+38
-34
lines changed

.github/workflows/build-test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ jobs:
213213

214214
# ci-job-full-datagen
215215
full-datagen:
216+
# Generated Rust is not stable across Rust versions
217+
if: ${{ github.event_name != 'schedule' }}
218+
216219
runs-on: ubuntu-latest
217220
steps:
218221
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

components/casemap/src/casemapper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ impl CaseMapper {
182182
langid: &LanguageIdentifier,
183183
options: TitlecaseOptions,
184184
char_is_lead: impl Fn(&CaseMapV1, char) -> bool,
185-
) -> StringAndWriteable<FullCaseWriteable<'a, true>> {
185+
) -> StringAndWriteable<'a, FullCaseWriteable<'a, true>> {
186186
let data = self.data.get();
187187
let (head, rest) = match options.leading_adjustment {
188188
LeadingAdjustment::Auto | LeadingAdjustment::ToCased => {

components/datetime/src/neo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,7 @@ where
14141414
/// // is not implemented for `icu::icu_calendar::Time`
14151415
/// formatter.convert_and_format(&Time::try_new(0, 0, 0, 0).unwrap());
14161416
/// ```
1417-
pub fn convert_and_format<'a, I>(&'a self, datetime: &I) -> FormattedNeoDateTime
1417+
pub fn convert_and_format<'a, I>(&'a self, datetime: &I) -> FormattedNeoDateTime<'a>
14181418
where
14191419
I: ?Sized + ConvertCalendar,
14201420
I::Converted<'a>: Sized + AllInputMarkers<R>,

components/segmenter/src/word.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl<'l, 's, Y: RuleBreakType<'l, 's> + ?Sized> WordBreakIterator<'l, 's, Y> {
7373
/// Returns an iterator over pairs of boundary position and word type.
7474
pub fn iter_with_word_type<'i: 'l + 's>(
7575
&'i mut self,
76-
) -> impl Iterator<Item = (usize, WordType)> + '_ {
76+
) -> impl Iterator<Item = (usize, WordType)> + 'i {
7777
core::iter::from_fn(move || self.next().map(|i| (i, self.word_type())))
7878
}
7979

provider/source/src/locale/likely_subtags.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub(crate) struct LikelySubtagsResources<'a> {
8585
impl<'a> LikelySubtagsResources<'a> {
8686
pub(crate) fn try_from_cldr_cache(
8787
cache: &'a super::super::CldrCache,
88-
) -> Result<LikelySubtagsResources, DataError> {
88+
) -> Result<LikelySubtagsResources<'a>, DataError> {
8989
let likely_subtags: &cldr_serde::likely_subtags::Resource = cache
9090
.core()
9191
.read_and_parse("supplemental/likelySubtags.json")?;

utils/resb/src/text/reader.rs

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use self::parse_state::ParseState;
2828
macro_rules! type_id {
2929
($(#[$meta:meta])* $name:ident, $tag:literal) => {
3030
$(#[$meta])*
31-
fn $name<'a, E>(input: ParseState<'a>) -> IResult<ParseState, ParseState, E>
31+
fn $name<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, ParseState<'a>, E>
3232
where
3333
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>
3434
{
@@ -40,7 +40,7 @@ macro_rules! type_id {
4040

4141
($(#[$meta:meta])* $name:ident, $( $tag:literal ),+) => {
4242
$(#[$meta])*
43-
fn $name<'a, E>(input: ParseState<'a>) -> IResult<ParseState, ParseState, E>
43+
fn $name<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, ParseState<'a>, E>
4444
where
4545
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>
4646
{
@@ -107,7 +107,7 @@ type_id!(
107107
);
108108

109109
/// Reads any type ID which may appear as a leaf in the resource tree.
110-
fn type_id_no_root<'a, E>(input: ParseState<'a>) -> IResult<ParseState, ParseState, E>
110+
fn type_id_no_root<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, ParseState<'a>, E>
111111
where
112112
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
113113
{
@@ -132,7 +132,7 @@ where
132132
/// It is presently unclear which characters appear in keys in practice, so in
133133
/// the interest of a simplified parse, only characters which have been
134134
/// encountered in real files are supported.
135-
fn invariant_chars<'a, E>(input: ParseState<'a>) -> IResult<ParseState, ParseState, E>
135+
fn invariant_chars<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, ParseState<'a>, E>
136136
where
137137
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
138138
{
@@ -143,7 +143,7 @@ where
143143
}
144144

145145
/// Reads a single-line comment up to but not including the final newline.
146-
fn eol_comment<'a, E>(input: ParseState<'a>) -> IResult<ParseState, ParseState, E>
146+
fn eol_comment<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, ParseState<'a>, E>
147147
where
148148
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
149149
{
@@ -153,7 +153,7 @@ where
153153
/// Reads a multi-line comment.
154154
///
155155
/// Does not support nested comments.
156-
fn delimited_comment<'a, E>(input: ParseState<'a>) -> IResult<ParseState, ParseState, E>
156+
fn delimited_comment<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, ParseState<'a>, E>
157157
where
158158
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
159159
{
@@ -164,7 +164,7 @@ where
164164
}
165165

166166
/// Reads one single-line or multi-line comment.
167-
fn comment<'a, E>(input: ParseState<'a>) -> IResult<ParseState, ParseState, E>
167+
fn comment<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, ParseState<'a>, E>
168168
where
169169
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
170170
{
@@ -186,7 +186,7 @@ where
186186
/// for these has also been omitted for the time being.
187187
///
188188
/// See [`Reader`] for more details on the specification.
189-
fn string<'a, E>(input: ParseState<'a>) -> IResult<ParseState, &str, E>
189+
fn string<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, &'a str, E>
190190
where
191191
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
192192
{
@@ -203,15 +203,15 @@ where
203203
}
204204

205205
/// Reads a signed or unsigned 32-bit integer.
206-
fn integer<'a, E>(input: ParseState<'a>) -> IResult<ParseState, u32, E>
206+
fn integer<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, u32, E>
207207
where
208208
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
209209
{
210210
context("integer", token(alt((u32, map(i32, |value| value as u32)))))(input)
211211
}
212212

213213
/// Reads and discards any number of comments and any amount of whitespace.
214-
fn discardable<'a, E>(input: ParseState<'a>) -> IResult<ParseState, (), E>
214+
fn discardable<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, (), E>
215215
where
216216
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
217217
{
@@ -220,7 +220,7 @@ where
220220

221221
/// Reads a single token as specified by the provided parser, surrounded by any
222222
/// number of comments and any amount of whitespace.
223-
fn token<'a, F, O, E>(mut parser: F) -> impl FnMut(ParseState<'a>) -> IResult<ParseState, O, E>
223+
fn token<'a, F, O, E>(mut parser: F) -> impl FnMut(ParseState<'a>) -> IResult<ParseState<'a>, O, E>
224224
where
225225
F: Parser<ParseState<'a>, O, E>,
226226
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
@@ -237,7 +237,7 @@ where
237237
/// Generates appropriate matchers for simple string tokens.
238238
macro_rules! simple_token {
239239
($name:ident, $str:expr) => {
240-
fn $name<'a, E>(input: ParseState<'a>) -> IResult<ParseState, ParseState, E>
240+
fn $name<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, ParseState<'a>, E>
241241
where
242242
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
243243
{
@@ -251,7 +251,7 @@ simple_token!(right_brace, "}");
251251
simple_token!(comma, ",");
252252

253253
/// Reads a table key.
254-
fn key<'a, E>(state: ParseState<'a>) -> IResult<ParseState, Key, E>
254+
fn key<'a, E>(state: ParseState<'a>) -> IResult<ParseState<'a>, Key<'a>, E>
255255
where
256256
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
257257
{
@@ -277,7 +277,7 @@ where
277277
}
278278

279279
/// Reads a single table entry, consisting of a key and an associated resource.
280-
fn table_entry<'a, E>(input: ParseState<'a>) -> IResult<ParseState, (Key, Resource), E>
280+
fn table_entry<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, (Key<'a>, Resource<'a>), E>
281281
where
282282
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
283283
{
@@ -308,7 +308,7 @@ macro_rules! resource_opt_tag {
308308

309309
/// Reads the body of a table resource, consisting of any number of key-resource
310310
/// pair entries.
311-
fn table_body<'a, E>(state: ParseState<'a>) -> IResult<ParseState, Table, E>
311+
fn table_body<'a, E>(state: ParseState<'a>) -> IResult<ParseState<'a>, Table<'a>, E>
312312
where
313313
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
314314
{
@@ -327,7 +327,7 @@ where
327327
///
328328
/// Though it is not required in the resource bundle text, the final in-memory
329329
/// representation sorts these pairs lexically by key.
330-
fn table_resource<'a, E>(input: ParseState<'a>) -> IResult<ParseState, Resource, E>
330+
fn table_resource<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, Resource<'a>, E>
331331
where
332332
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
333333
{
@@ -338,7 +338,9 @@ where
338338
}
339339

340340
/// Reads the root table resource, noting whether locale fallback is disabled.
341-
fn root_table_resource<'a, E>(input: ParseState<'a>) -> IResult<ParseState, (bool, Resource), E>
341+
fn root_table_resource<'a, E>(
342+
input: ParseState<'a>,
343+
) -> IResult<ParseState<'a>, (bool, Resource<'a>), E>
342344
where
343345
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
344346
{
@@ -357,7 +359,7 @@ where
357359

358360
/// Reads an array resource consisting of any number of hetereogeneously-typed
359361
/// resources, optionally separated by commas.
360-
fn array_resource<'a, E>(input: ParseState<'a>) -> IResult<ParseState, Resource, E>
362+
fn array_resource<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, Resource<'a>, E>
361363
where
362364
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
363365
{
@@ -379,7 +381,7 @@ where
379381
/// These integers have no inherent signedness; consumers specify whether a
380382
/// signed or unsigned integer is desired. Because of this, note that 28-bit
381383
/// integers require special handling in-memory. See [`Int28`] for more details.
382-
fn int_resource<'a, E>(input: ParseState<'a>) -> IResult<ParseState, Resource, E>
384+
fn int_resource<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, Resource<'a>, E>
383385
where
384386
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
385387
{
@@ -393,7 +395,7 @@ where
393395

394396
/// Reads an integer vector resource, consisting of any number of 32-bit
395397
/// integers separated by commas. A trailing comma is optional.
396-
fn int_vector_resource<'a, E>(input: ParseState<'a>) -> IResult<ParseState, Resource, E>
398+
fn int_vector_resource<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, Resource<'a>, E>
397399
where
398400
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
399401
{
@@ -424,7 +426,7 @@ fn binary_byte(input: &str) -> IResult<&str, u8> {
424426
/// digits representing byte values.
425427
///
426428
/// See [`binary_byte`].
427-
fn binary_resource<'a, E>(input: ParseState<'a>) -> IResult<ParseState, Resource, E>
429+
fn binary_resource<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, Resource<'a>, E>
428430
where
429431
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
430432
{
@@ -450,7 +452,7 @@ where
450452
/// braces.
451453
///
452454
/// See [`string`] for more details on the representation of strings.
453-
fn string_resource<'a, E>(input: ParseState<'a>) -> IResult<ParseState, Resource, E>
455+
fn string_resource<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, Resource<'a>, E>
454456
where
455457
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
456458
{
@@ -464,7 +466,7 @@ where
464466
}
465467

466468
/// Reads a single resource.
467-
fn resource<'a, E>(input: ParseState<'a>) -> IResult<ParseState, Resource, E>
469+
fn resource<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, Resource<'a>, E>
468470
where
469471
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
470472
{
@@ -482,7 +484,7 @@ where
482484
}
483485

484486
/// Reads a complete resource bundle.
485-
fn bundle<'a, E>(input: ParseState<'a>) -> IResult<ParseState, ResourceBundle, E>
487+
fn bundle<'a, E>(input: ParseState<'a>) -> IResult<ParseState<'a>, ResourceBundle<'a>, E>
486488
where
487489
E: ParseError<ParseState<'a>> + ContextError<ParseState<'a>>,
488490
{

utils/zerotrie/src/builder/litemap.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,10 @@ where
4646
}
4747
}
4848

49-
/// TODO: Once const mut references are allowed, we can make this more infallible by
50-
/// calculating the required length, heap-allocating the required capacity, and pointing
51-
/// ConstAsciiTrieBuilderStore to the heap buffer.
52-
/// ```compile_fail
53-
/// // error[E0658]: mutable references are not allowed in constant functions
49+
/// TODO(MSRV 1.83): Make this more infallible by calculating the required length,
50+
/// heap-allocating the required capacity, and pointing ConstAsciiTrieBuilderStore
51+
/// to the heap buffer.
52+
/// ```ignore
5453
/// const fn write_to_mut_buffer(buf: &mut [u8]) { buf[0] = 0; }
5554
/// ```
5655
const _: () = ();

utils/zerovec/src/map2d/borrowed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ where
274274
V: ?Sized,
275275
{
276276
/// Produce an ordered iterator over keys0
277-
pub fn iter0<'l>(&'l self) -> impl Iterator<Item = ZeroMap2dCursor<'a, 'a, K0, K1, V>> + '_ {
277+
pub fn iter0<'l>(&'l self) -> impl Iterator<Item = ZeroMap2dCursor<'a, 'a, K0, K1, V>> + 'l {
278278
(0..self.keys0.zvl_len()).map(move |idx| ZeroMap2dCursor::from_borrowed(self, idx))
279279
}
280280
}

0 commit comments

Comments
 (0)