@@ -131,6 +131,11 @@ fn handle_ebadf<T>(r: io::Result<T>, default: T) -> io::Result<T> {
131
131
///
132
132
/// [`io::stdin`]: fn.stdin.html
133
133
/// [`BufRead`]: trait.BufRead.html
134
+ ///
135
+ /// ### Note: Windows Portability Consideration
136
+ /// When operating in a console, the Windows implementation of this stream does not support
137
+ /// non-UTF-8 byte sequences. Attempting to read bytes that are not valid UTF-8 will return
138
+ /// an error.
134
139
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
135
140
pub struct Stdin {
136
141
inner : Arc < Mutex < BufReader < Maybe < StdinRaw > > > > ,
@@ -144,6 +149,11 @@ pub struct Stdin {
144
149
/// [`Read`]: trait.Read.html
145
150
/// [`BufRead`]: trait.BufRead.html
146
151
/// [`Stdin::lock`]: struct.Stdin.html#method.lock
152
+ ///
153
+ /// ### Note: Windows Portability Consideration
154
+ /// When operating in a console, the Windows implementation of this stream does not support
155
+ /// non-UTF-8 byte sequences. Attempting to read bytes that are not valid UTF-8 will return
156
+ /// an error.
147
157
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
148
158
pub struct StdinLock < ' a > {
149
159
inner : MutexGuard < ' a , BufReader < Maybe < StdinRaw > > > ,
@@ -157,6 +167,11 @@ pub struct StdinLock<'a> {
157
167
///
158
168
/// [lock]: struct.Stdin.html#method.lock
159
169
///
170
+ /// ### Note: Windows Portability Consideration
171
+ /// When operating in a console, the Windows implementation of this stream does not support
172
+ /// non-UTF-8 byte sequences. Attempting to read bytes that are not valid UTF-8 will return
173
+ /// an error.
174
+ ///
160
175
/// # Examples
161
176
///
162
177
/// Using implicit synchronization:
@@ -328,6 +343,11 @@ impl<'a> fmt::Debug for StdinLock<'a> {
328
343
///
329
344
/// Created by the [`io::stdout`] method.
330
345
///
346
+ /// ### Note: Windows Portability Consideration
347
+ /// When operating in a console, the Windows implementation of this stream does not support
348
+ /// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
349
+ /// an error.
350
+ ///
331
351
/// [`lock`]: #method.lock
332
352
/// [`io::stdout`]: fn.stdout.html
333
353
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -343,6 +363,11 @@ pub struct Stdout {
343
363
/// This handle implements the [`Write`] trait, and is constructed via
344
364
/// the [`Stdout::lock`] method.
345
365
///
366
+ /// ### Note: Windows Portability Consideration
367
+ /// When operating in a console, the Windows implementation of this stream does not support
368
+ /// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
369
+ /// an error.
370
+ ///
346
371
/// [`Write`]: trait.Write.html
347
372
/// [`Stdout::lock`]: struct.Stdout.html#method.lock
348
373
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -358,6 +383,11 @@ pub struct StdoutLock<'a> {
358
383
///
359
384
/// [Stdout::lock]: struct.Stdout.html#method.lock
360
385
///
386
+ /// ### Note: Windows Portability Consideration
387
+ /// When operating in a console, the Windows implementation of this stream does not support
388
+ /// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
389
+ /// an error.
390
+ ///
361
391
/// # Examples
362
392
///
363
393
/// Using implicit synchronization:
@@ -476,6 +506,11 @@ impl<'a> fmt::Debug for StdoutLock<'a> {
476
506
/// For more information, see the [`io::stderr`] method.
477
507
///
478
508
/// [`io::stderr`]: fn.stderr.html
509
+ ///
510
+ /// ### Note: Windows Portability Consideration
511
+ /// When operating in a console, the Windows implementation of this stream does not support
512
+ /// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
513
+ /// an error.
479
514
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
480
515
pub struct Stderr {
481
516
inner : Arc < ReentrantMutex < RefCell < Maybe < StderrRaw > > > > ,
@@ -487,6 +522,11 @@ pub struct Stderr {
487
522
/// the [`Stderr::lock`] method.
488
523
///
489
524
/// [`Stderr::lock`]: struct.Stderr.html#method.lock
525
+ ///
526
+ /// ### Note: Windows Portability Consideration
527
+ /// When operating in a console, the Windows implementation of this stream does not support
528
+ /// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
529
+ /// an error.
490
530
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
491
531
pub struct StderrLock < ' a > {
492
532
inner : ReentrantMutexGuard < ' a , RefCell < Maybe < StderrRaw > > > ,
@@ -496,6 +536,11 @@ pub struct StderrLock<'a> {
496
536
///
497
537
/// This handle is not buffered.
498
538
///
539
+ /// ### Note: Windows Portability Consideration
540
+ /// When operating in a console, the Windows implementation of this stream does not support
541
+ /// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
542
+ /// an error.
543
+ ///
499
544
/// # Examples
500
545
///
501
546
/// Using implicit synchronization:
0 commit comments